To start the Figwheel compiler, navigate to the project folder and run the following command in the terminal:
lein figwheel
Figwheel will automatically push cljs changes to the browser.
Once Figwheel starts up, you should be able to open the public/index.html
page in the browser.
lein clean
lein package
- Mounting
- Updating
- UnMounting
Respective Reagent keys.
Mounting -> :component-did-mount
Render -> :reagent-render
Updating -> :component-did-update
UnMounting -> :component-will-unmount
Mounting Phase
- :reagent-render - this renders the
Counter
component to the DOM. - :component-did-mount - this is called after the
Counter
component is rendered/mounted on to the DOM.
Update Phase
- :reagent-render - updates the Atom and rerenderd the
Counter
component to the DOM. - :component-did-update - called right after the
Counter
component is rerendered on to the DOM.
UnMount Phase
- :component-will-unmount - this is called right before Reagent/React unmounts the component from the DOM.
- React Lifecycle for Re-frame
- How To Use React.js Component Lifecycle Methods (outdated but a good read)
- React Docs