Hacker News new | past | comments | ask | show | jobs | submit login

Components are only JS, aren’t they?



They usually are but don't have to be. If you only copy the JS you'll miss any HTML content in the page that the React component uses for hydration, any CSS that's linked rather than defined in the component, any code that sits outside of the React structure, anything that comes down over an API or a socket, etc.

Itd be possible to build a React app that has very little React code in it, but it'd also be weird.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: