Hacker News new | ask | show | jobs
by dubin 3400 days 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.