Defining page titles in react-router route config
2016-08-29
I’ve been using react-helmet to set page titles in Nomos, but it’s felt weird to me to litter my JSX templates with
I use this by defining a title
on my route’s config, which can be either a string or a function (which receives the component’s props as an argument). Something like:
<Route
path='/documents/:documentId'
component=
title=
/>