Manage the head

Like React Helmet, but built in userland: put a <head> tag into any component, and its title, meta tags, styles and scripts are moved into the head of the document. Duplicate titles, descriptions and keywords are replaced by the last one. A small guard takes care of this; have a look at the source to see how it works.

Switch the components on and off and watch the browser tab and the resulting <head> change.

No component is active, so the head only has what the route passes to the layout.