Lemoncode/react-typescript-samples

Update dependencies on 03 Navigation

brauliodiez opened this issue · 3 comments

Update dependencies, check if we are using the latest react-router (probably not), if not write a comment on this issue and we can work with you on updating the router version with you (on a different issue and branch)

The following dependencies have been updated: react, react-dom, types/react, types/react-dom, file-loader, url-loader, style-loader and webpack.

react-router needs to be updated (from version 3.0.5 to 4.2.0) and also types/react-router (from 3.0.11 to 4.0.16).

Looking over these examples today, I am having an issue on the react-router that may be dependency related. I am getting an error

@types/react-router/index"' has no exported member 'hashHistory'

I have been trying different versions of router and the types. My current versions are:

react:  16.3.2
react-router: 4.2.0
@types/react-router: 4.0.23

realizing you guys are not the maintainers of react-router or the types, I'm hoping you might have some insights.

@dfmartin Hi, there are breaking changes between react router 3 and 4

Refer to this sample for a version 4 friendly version, thanks:

https://github.com/Lemoncode/react-by-sample/tree/master/14%20ReactRouter