Re:Web workers are not the answer
by azangru on Monday October 17, 2022 @06:51PM
(#33240542)
The blog post is littered with React code (plus Apollo). Which part of the problem was specific to the workers - and how can this lesson be generalized to any FE framework, or no framework at all?
[ Parent
| on HN ]
Re:Web workers are not the answer
by tobyhinloopen on Monday October 17, 2022 @06:54PM
(#33240568)
This blog post has nothing to do with workers and everything with “just don’t use React with hooks”
Re:Web workers are not the answer
by theogravity on Monday October 17, 2022 @07:17PM
(#33240805)
Or don't use GraphQL subscriptions / Apollo for GraphQL.
Re:Web workers are not the answer
by eyelidlessness on Monday October 17, 2022 @07:05PM
(#33240689)
It’s even simpler than that I’m afraid. It’s “we found a bug in our glue code with another library and we found it by debugging after overengineering.” It doesn’t implicate any of the technologies they use, just an oversight in their prior root cause analysis process.
The lesson is to understand how reactivity works with the tech stack your project is built with.
This is a problem with react, and it's middlewares where things become a convoluted mess if there isn't at least one person that's experienced with what's actually happening and is attentive to avoid pitfalls with potential side-effects.
Re:Web workers are not the answer
by NaughtyShiba on Tuesday October 18, 2022 @06:19AM
(#33245161)
The lesson is that, two objects aren’t equal even if their content is.
This is what to, the issue boils down, and such incorrect React’s usage should be clear to junior-level developers.