bananaoomarang / isomorphic-redux

Isomorphic Redux demo, with routing and async actions
https://medium.com/@bananaoomarang/handcrafting-an-isomorphic-redux-application-with-love-40ada4468af4
MIT License
455 stars 87 forks source link

How to get it work in isomorphic if my Redux action depends on Route param ? #57

Closed iroy2000 closed 8 years ago

iroy2000 commented 8 years ago

I have a Route

<Route path="/school/:schoolAlias" component={SchoolDetailHandler} />

And in that handler, I have that

static needs = [
   () => {
        return schoolActions.getSchoolByAlias(this.props.params.schoolAlias)
   }
]

Note that my action depends on the "router params --> schoolAlias"

But it throws me error on props undefined. How do you get the schoolAlias ?

iroy2000 commented 8 years ago

LOL, resloved ... I <3 your tutorial :)