History: basename doesn't exist in createBrowserHistory in history v5

Created on 2 Jul 2020  路  4Comments  路  Source: ReactTraining/history

What is the way around with basename if I'm using the newest version of history lib(5.0.0)

const history = createBrowserHistory({ basename: '/user-instructions' });

Most helpful comment

I think it is a necessary option. Must use the oldest version for that.

All 4 comments

Seems to be an intentional change. See the v5 pull request #751 and #811.

There is no workaround to my knowledge.

I think it is a necessary option. Must use the oldest version for that.

why not basename ???? it's so useful

@vlzuiev I've just started using a very hacky workaround, but I have my fingers crossed that there will be a nicer solution for use navigation from sagas/logic outside of components in the future.

https://github.com/ReactTraining/history/issues/810#issuecomment-680722365

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wssgcg1213 picture wssgcg1213  路  6Comments

zhangdingding picture zhangdingding  路  4Comments

vchibilisco-convey picture vchibilisco-convey  路  3Comments

AndreasHogstrom picture AndreasHogstrom  路  4Comments

andi5 picture andi5  路  6Comments