Comment

Comment by TomMarius

It's stored internally in React. The instance of your component does not hold the state, just a reference to the state object which is repopulated each render (just like useState, it's the exact same mechanism), and after the render is done, the instance is destroyed.

More here: https://reactjs.org/blog/2015/12/18/react-components-element...

parent TomMarius 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton