Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

How can a basename be set for your example app? (browserHistory) #178

@Richacinas

Description

@Richacinas

I was wondering how could we set a basename for this application. It is a normal usage to have the project hosted on a folder inside our virtual host.

Something like this:

const browserHistory = useRouterHistory(createHistory)({
    basename: '/project-folder'
});

being passed to our Router, is causing an error like:

Error: Invariant Violation: Browser history needs a DOM

Anybody could explain how to properly set up a baseurl so client side and server side routing works the same way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions