DEV Community

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

Collapse
 
murkrage profile image
Mike Ekkel

The answer still holds true, though. Simply because it's not the way React works.

That's not a bad thing, mind you. Just because it doesn't work that way, doesn't mean it couldn't work that way. That's how most things come to be. We use product A, B and C. Honestly, we just want a product that does some of the things from A, some of the things from B and some of the things from C combined. Now we've got the iPhone.

I see the answer as a very strong argument, which I'm willing to break down. It doesn't work that way, but I'll make it work that way! Then if it does work that way, and it works well, you can go back to the source and let it adopt the changes.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis • Edited

I think it depends on how literal we're being about "it's not the way React works". I agree with you that, if the app/library/tool/whatever truly doesn't work that way, then it can absolutely be a fun and enriching challenge to figure out how it could work that way. But I feel the issue is that, often, when people say, "That's just not the way that this works" they're kinda fibbing about that. Many times, the technique does work that way - but the person claiming that it "doesn't work" is really saying, "This doesn't work with the way that I personally want to see code written." In other words, when some people utter those words, they're not referencing empirical truth. They're just using "it's not the way React works" as a cover for their own preferences - and their own dogma.