nx-js / observer-util

Transparent reactivity with 100% language coverage. Made with ❤️ and ES6 Proxies.
MIT License
1.2k stars 94 forks source link

4.2.0 broke something #30

Closed mendrik closed 6 years ago

mendrik commented 6 years ago

I have been using version 4.1.3 without any problems, but when I tried 4.2.0 my model updates were not propagated downwards anymore. Is there something that changed when render() is called? reverting back to 4.1.3 fixed the issue.

I have code like this

 <InputPassword changes={v => loginModel.password = v}
   name="password"
   value={loginModel.password}
   big={true}/>

and my model is imported from

const loginModel = observable(new LoginForm())
export {loginModel}

I receive the new v values but when the component re-renders value hasn't changed. I use it with preact but it's basically almost the same as react-easy-state

Any idea what is breaking it?

solkimicreb commented 6 years ago

Can you check that you don't accidentally have two separate versions (4.1.3 and 4.2.0) in your node modules?

Edit: easiest way is to search for it in package-lock, if you use one.

mendrik commented 6 years ago

omg that was it I have a helper dependency and I updated it only there. sorry for wasting your time!

solkimicreb commented 6 years ago

No worries 🙂 This is kind of a common thing, I think I will add a console warning when this happens.