mirror of https://github.com/status-im/reagent.git
782 B
782 B
Question
My component is not rerendering, what should I do?
Answer
This could happen for a few reasons. Try the following:
- Make sure you are using a
reagent.core/atom
(i.e., ratom) instead of a normalatom
. - Make sure to deref your ratom (e.g, @app-state) inside of your component.
- Make sure your ratom will survive a rerender. Either declare it as a global var, or use a form-2 component. Read this if you want to understand why.
- Make sure to deref your ratom outside of a seq or wrap that seq in a
doall
. See this related issue.
Up: FAQ Index