Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Reference issues:

1) Needing an advanced understanding of closures. Not always, but sometimes. That "sometimes" is often unintuitive, requiring weird solutions like useRef. Good luck beginners.

2) Things like updating reducer state by using a spread object, which creates a new object which can then send a system haywire. Seems fine, and is mostly fine in most cases, but hey, oftentimes not fine, and why that's so is not always clear. So then there's memoization, and useCallback and all of these safety checks -- each with their own dependencies array that need to be checked. It's really too much tbh. There are lots of solutions out there that use proxies to check this stuff; React should have baked that into the core and completely removed that responsibility from the user unless they wanted to opt-in micromanage performance of their code.



> Things like updating reducer state by using a spread object, which creates a new object which can then send a system haywire

This is what you should be doing and not doing this seems more likely to cause problems. Do you have an example?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: