DEV Community

loading...

Discussion on: Throw Out Your React State-Management Tools

Collapse
bytebodger profile image
Adam Nathaniel Davis Author • Edited

I'm playing around with something today and your question came to mind. If you want the context to be properly updated on state changes, you must be referencing it from within the render() function. I'm gonna do a follow-up post on this soon that will illustrate this. This might be part of the issue you've experienced.

Collapse
thatzacdavis profile image
Zachary Davis

Looking forward to it!

Thread Thread
bytebodger profile image
Adam Nathaniel Davis Author

And... here it is:

dev.to/bytebodger/a-context-api-fr...

It's not radically different from what I already highlighted. But it emphasizes the need to put the context references in the render() function. It also provides a few stylistic improvements to the first post...