5 ms·
Something cool you can do with React is create an intelligent `Heading` component that wires into context to determine where it is at in the tree. It could then
by dubin 10y ago
Something cool you can do with React is create an intelligent `Heading` component that wires into context to determine where it is at in the tree. It could then adjust it's actual HTML heading element accordingly. So for example, when you have a `Heading` inside another `Heading`, they render to `h2` and `h1` respectively.