VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.88k forks source link

Reactive State #2676

Closed ErikDakoda closed 3 years ago

ErikDakoda commented 3 years ago
eric-burel commented 3 years ago

Sounds awesome ! I'll review more deeply later on but I already see unit tests. @Apollinaire @SachaG what's your opinion on this?

ErikDakoda commented 3 years ago

@eric-burel now that I have been using reactive state I am considering ditching immutability-helper for updating the state object and instead use a simple Object.assign() like React's setState() does. I could accept a stateChange object or a function that returns a stateChange object. Any thoughts?

eric-burel commented 3 years ago

@ErikDakoda what does it change in terms of code for the end usage ? Whatever you feel the most intuitive when coding is fine with me, and ditching a dependency is always good

ErikDakoda commented 3 years ago

I will be replacing this PR with an updated one.