DEV Community

Discussion on: Why Is This An "Anti-Pattern" in React???

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

No worries!

Thanks for letting me know - I always worry when posting these kind of responses that they're not going to land right.

Also, I totally agree with your stance on dogma - if you're using something simply because it's really popular, without understanding the pros and cons, you might as well be blindly copying code from Stack Overflow (actually, I think that might be the less harmful of the two).

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis • Edited

OK, now that I've had some time to work through some coding samples and figure some things out, I finally have time to put a "proper" reply on your well-considered points. And... I'm not going to.

Because the stuff I've figured out over the last 24 hours (with the awesome feedback of you and others on this post) really shouldn't be encapsulated in a single comment/reply. I'm gonna put this into a new blog posting.

But if you're curious about the Cliff's Notes version of what I've come up with:

  1. My previous approach may not have been outright wrong, but I definitely understand a lot of your points, and it makes the optimal use-case for my approach extremely narrow.
  2. This led me to reassess other approaches - including having another look at the Context API (which is what Redux uses under the covers).
  3. I'm now convinced, with the "new"/finalized Context API, that this will definitely be my go-to state-sharing/prop-passing tool of the future.

That's what I'm gonna explain in my next post...

Thread Thread
 
pclundaahl profile image
Patrick Charles-Lundaahl

Wow, thanks! I'm stoked you found my ramblings useful!

Your article was really thought-provoking. Also, respect for posting things you know people disagree with - that stuff terrifies me. Have fun with the Context API! I'm looking forward to your next post!

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis