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

> now a React compiler is on its way too

I googled for this and couldn't find anything. Do you have any links that give more info about this?



There isn't much info out there yet, but this video is a small preview: https://youtu.be/lGEMwh32soc

The latest update is mentioned in the March 2023 blog post: https://react.dev/blog/2023/03/22/react-labs-what-we-have-be...


Ah, interesting!

My tldr of this is it'll be a transform of easy to read idiomatic react code using hooks etc into more performant code that avoids unnecessary rerenders by statically analysing where optimisations like memoisation can be injected without changing behavior.

Pretty smart stuff but also, yeah, perhaps a bit of a black hole of complexity. I can immediately imagine issues with debugging or somehow relying on the side effects of spurious rerenders and that breaking things in the real world.

You'd hope code like this does not exist in the wild... and yet exist it does :-)


As I replied above, all is neat and great until you have to debug something not working as expected.




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

Search: