clojurescript - Differences between :init-state vs :state at build function -


i understand can initiate state of component passing map value of :init-state keyword. passing map value of :state keyword, example, between component , child component, can share same state? it? thanks.

the difference when childs state gets set.

  • :init-state set once, when component mounted.
  • :state set on each render.

therefore, :init-state should used (as name suggests), initialise state. on other hand, :state used set state changes on time.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -