javascript - react-router link not receiving router in context -
i'm using react , react-router create single page javascript application. each page it's own component. on 1 page able create link component , works intended. on page following error:
warning: failed context types: required context `router` not specified in `link`. uncaught typeerror: cannot read property 'makehref' of undefined
here file set routes:
here component link works (in teamrow component):
here component link doesn't work (line 31):
i logged contexts throughout app examine them , time isn't empty object in app component. doing wrong in teampage component link isn't working? how come context empty in homepage component link works?
try changing require to
// remove react-router require var {link} = require('react-router');
or
// keep react-router require var link = reactrouter.link;
Comments
Post a Comment