Skip to content

Should react-router-dom be utilized on the server or is there a suitable replacement? #2

@deanrad

Description

@deanrad

It raised an eyebrow to see a dependency on react-router-dom in the server/handlerRender.js file, since it's a client library being utilized on the server.

import { matchPath } from 'react-router-dom';

From Michael Jackson's guide you referenced: https://reacttraining.com/react-router/web/guides/server-rendering, there's a /server folder which might be more appropriate. As a code reviewer I'd be less concerned about the latter than the former..

import ReactDOMServer from 'react-dom/server'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions