If I get you right, you mean a different container for every segment, so you don't mix up different contexts, correct? I do that for really big components or when I need to fetch stuff separately or just make a reusable block of code for multiple pages. Otherwise, I just stick to something similar to what I did above.
Great Tips!.
IMO, Tip #1 can be improved futher by using custom hooks. If we have stateful logic that are to be shared, it is better to use a custom hook.
Full stack developer building things to make life a little easier. Huge fan of JavaScript, React, Node.js, and testing my code. • twitter.com/ZakLaughton • zaklaughton.dev
Came here to say this! Dan Abramov added an update to a blog he wrote recommending this "container" style here, essentially saying that he thinks hooks are now a better solution.
Loved the post man, just a simple add-on
if someone is using airbnb eslint spreading the props will launch a problem, hopefully someone reads this while looking it up haha
If I get you right, you mean a different container for every segment, so you don't mix up different contexts, correct? I do that for really big components or when I need to fetch stuff separately or just make a reusable block of code for multiple pages. Otherwise, I just stick to something similar to what I did above.
Great Tips!.
IMO, Tip #1 can be improved futher by using custom hooks. If we have stateful logic that are to be shared, it is better to use a custom hook.
Came here to say this! Dan Abramov added an update to a blog he wrote recommending this "container" style here, essentially saying that he thinks hooks are now a better solution.
Thanks for the info😊
These are awesome!
was great , thank you so much🙏😍
Loved the post man, just a simple add-on
if someone is using airbnb eslint spreading the props will launch a problem, hopefully someone reads this while looking it up haha
Oh wow, didn't know that. Is there a workaround?
These are awesome!