Every application has a state. State represents our application data and changes over time. Wikipedia describes state as:
A computer program stor...
For further actions, you may consider blocking this person and/or reporting abuse
Nice thank tout
Everytime, I see post about State
I suggest to give an eye to Meiosis pattern
Can you elaborate? I totally don't know what you mean 😉
I think it is this one meiosis.js.org/
I haven't read much about it though.
Read it, you won't regret it 🙂
Not a fan. I've seen people convert to stream based centralized state management and it hasn't worked well from performance perspective. Might be that they've done something wrong, but haven't seen them being able to fix the issue and it's been 1½ years since the change. They did the change because it resulted to "shorter and neater code".
Yes, in my experience we always should start from less expressive tool and only if it doesn't work for us search for more sophisticated solutions.
Excuse-me,
Here is a link to this concept
Meiosis
You can apply it to any front-end framework you want
Thanks. Took a look, looks very interesting.
😊 yes it is
Once you try it, you will adopt it
I have posted several articles on it on devto,
here is one or them reactmeio
Regards
Thank you for such an excellent series.
Just one small point. React can help us with delaying the evaluation:
const lionExists = useMemo(() =>
animals.some(animal => animal.type === 'lion'), [animals]);
So, it will be recalculated only when animals is changed.
Yes, that is very good comment. Thank you Enes.
In regard to the topic of calculated/derived state properties, I always ask myself the two questions:
In case the answer is yes to both questions then one property can be derived from the other (the base one).
This has served me well so far ;)
Thanks very informative!
amazing article!
state modelling is TOO important