kitze / mobx-router

A simple router for MobX + React apps
509 stars 66 forks source link

<Link> Usage #61

Closed Architecd closed 6 years ago

Architecd commented 6 years ago

Hey,

first of all thanks a lot for mobx-router. It works very nicely :)

One thing I couldn't really figure out though was how to use the <Link> properly. How to import & pass a view? Is there any documentation on this available?

thanks a lot for your help :)

JamesTheHacker commented 6 years ago

I think you should use router.goTo(view.someView) but I'm having issues with that myself atm.

kitze commented 6 years ago

@Architecd @JamesTheHacker check out the examples repo, here's the Link component: https://github.com/kitze/mobx-router-example/blob/master/src/components/Home/index.js#L27