Open Crashmailman opened 5 years ago
I experienced the same yesterday. I just resorted to ditching the LinkContainer and just replacing it with which is imported from react-router-dom. I just read about the possible fix of wrapping the LinkContainer in a withRouter in order to make it work, which was a thought that I hadn't tried.
Hear is the thread: https://github.com/react-bootstrap/react-router-bootstrap/issues/237
@rooox Good catch. Thanks for looking into it. Can you elaborate on your fix a bit more? I'll add it to the chapter.
Here is a temporary fix for this while react-router-bootstrap rolls out a permanent fix for it (https://github.com/react-bootstrap/react-router-bootstrap/pull/248).
Hey @jayair ! It doesn't fiz the issue for me. Keep getting the same error. No idea why. Any clues? Copied the code exactly.
Did you create a new component like the comment suggested?
An alternative fix here is to use React Router 4.3.1 for now while react-router-bootstrap rolls out a fix.
$ npm install react-router-dom@4.3.1
Yup created a new component. I'll try the older version as a temporary solution and give feedback later today. Thanks for the amazing work!
Worked on 4.3.1 (obviously right?)
Hi guys Love your work so far, very easy to follow, i am sorry to be a pain but i have been following this task and i keep getting an error when i run , hoping someone can tell me where i went wrong, i am sure i followed everything but i might not have. thank you in advance
TypeError: Cannot read property 'history' of undefined LinkContainer.render C:/Users/Adam.Wolarczuk/Desktop/Projects/notes-app-client/node_modules/react-router-bootstrap/lib/LinkContainer.js:147 144 | getIsActive = _props.isActive, 145 | props = _objectWithoutProperties(_props, ['children', 'replace', 'to', 'exact', 'strict', 'activeClassName', 'className', 'activeStyle', 'style', 'isActive']); 146 |