JavaScript with JSX, from "Hooks at a Glance" (React documentation, October 2018)
For React's first five years a component with state had to be a class. At React Conf in October 2018 the team showed a function that remembers things, and this was the example on the documentation page the next morning.
The call to useState returns the current value and a function to change it; calling the setter re-renders the function, which calls useState again and gets the new value back. There is no class, no constructor, no this. The markup inside the return statement is JSX, HTML written directly in JavaScript, which was itself controversial when React introduced it in 2013. Hooks shipped in React 16.8 in February 2019 and within a few years most React code was written this way. The example is here as the plainest statement of an idea that took over user interface programming: the screen is a function of state, and state is a value you hold in a variable.