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:

http://pastebin.com/wben9bzw

here component link works (in teamrow component):

http://pastebin.com/hjg2d43m

here component link doesn't work (line 31):

http://pastebin.com/pwb7j8mk

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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -