Fork me on GitHub
#om
<
2017-10-19
>
levitanong14:10:15

Hey all, om innards question. When (and where in the source) do the props get stored in component local state? I’m running into what appears to be a competition between data in props and data in state, and the copy in state is winning out, causing a bunch of problems. Basis of my question: om props is running max-keys on basis-t to decide whether to return state or props. https://github.com/omcljs/om/blob/master/src/main/om/next.cljc#L1107

matthavener15:10:03

props in react are passed in from the parent, so they aren’t really “stored” per-se

matthavener15:10:02

if om.next does a targeted update to a component, its going to store the new values for the component in state, otherwise it would need to re-render from a parent

levitanong15:10:26

@matthavener I see, that clears some things up. do you know which function does the storing of the new values for targeted updates to the component?

matthavener15:10:25

I think its update-props!

matthavener15:10:44

it all happens in reconcile!