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-stateset once, when component mounted.:stateset on each render.
therefore, :init-state should used (as name suggests), initialise state. on other hand, :state used set state changes on time.
Comments
Post a Comment