Every server-rendered app ends up with this ticket:
The team page has 40 people on it. Can we add a search box?
You can build it. You can also solve it the way many teams do: render the list again in JavaScript, fetch JSON from a new endpoint, or turn the page into an SPA. All of those mean the list now exists twice, once on the server and once in the browser, and you have to keep them in agreement.
There's a smaller option. The server already sent the list. The filter only has to hide the rows that don't match .
This tutorial adds a live filter to a server-rendered list using Brio.js from one script tag. It takes about 14 lines of JavaScript and no build step, and the page still works if the script never loads.
What we're building
A list of people rendered by Express. A search box appears above it.…