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

I see what you’re getting at, but technically the virtual DOM is what makes JSX declarative.

JSX doesn’t actually write anything, it’s just a templating language over React.createElement.

It’s the virtual DOM that actually syncs those structures created by createElement to the real DOM. So it’s the virtual DOM that allows you to write your code declaratively.

That’s evidenced by OP’s project, which is JSX without the declarative piece. You just get an Element and then you have to update it imperatively if you want to change anything.




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

Search: