olebedev / go-starter-kit

[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Other
2.82k stars 358 forks source link

[Document]I think there should be some document on the onEnter part... #49

Closed maxsonic closed 8 years ago

maxsonic commented 8 years ago

I have encountered lots of bugs related with onEnter method. All those bugs are caused by my code, but I see no error message on the console:(..

To successfully debug the bug in the onEnter method, one should be warned that even a small syntax error will result in malfunction and the server side rendering will not work. Hence, one should run the code on the client side first and then move to the onEnter part.

And the router params should be written done on the readme.md to tell the users where to find the url parameters, i.e. nextState.params.xxx.

I would like to say this is really a nice starer kit :)

olebedev commented 8 years ago

Hi @maxsonic,

thanks for your message.

I have encountered lots of bugs related with onEnter method. All those bugs are caused by my code, but I see no error message on the console:(..

Actually, you should see the error message at the client-side, if the problems was caught at server-side. Have a look - this and this.

... Hence, one should run the code on the client side first and then move to the onEnter part.

Isomorphic render assumes that you got already rendered page to the browser first.

And the router params should be written done on the readme.md to tell the users where to find the url parameters, i.e. nextState.params.xxx.

I really don't mind if good people will send me pull request.

I would like to say this is really a nice starer kit :)

Glad to hear. Thank you.