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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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