kodyl / react-document-meta

HTML meta tags for React-based apps. Works for both client- and server-side rendering, and has a strict but flexible API.
MIT License
320 stars 23 forks source link

Best way to use with react-router #23

Open simonschllng opened 8 years ago

simonschllng commented 8 years ago

I'm planning to implement react-document-meta but am already using react-router. Where should I place the top-most <DocumentMeta />?

The following does not seem to work:

    <Router (..)>
        <DocumentMeta />
        <Route ... ></Route>
    </Router>
danieljuhl commented 8 years ago

@simonschllng You probably have an outer most route to handle you basic layout, right? In that case, simply place it as the outer most element in that component.