Skip to content
Adam Manuel’s “Dev Blog”React live block: counter

Find your next rabbit hole

A topic, a tool, a tiny curiosity. Start anywhere.

React live block: counter

A live block is a small React component inside an otherwise static article. Click the button to update its local state, or open View source to inspect the registered component tag.

Try the counter

Interactive example. Enable JavaScript to run it.

View source
<Counter id='counter' />

Ordinary fences stay examples

Code fences are displayed examples and never execute:

throw new Error('This is a displayed code example, not a live block.')

For a shared component example, see the interactive pipeline diagram.

You made it. Thanks for reading.