question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing documentation on returned `thunk` from `connectRoutes`

See original GitHub issue

The minimal example returns a thunk from connectRoutes:

const { reducer, middleware, enhancer, thunk } = connectRoutes(routesMap)

However, it seems this is never used in the example. I could also not find any documentation of what it does, in https://github.com/faceyspacey/redux-first-router/blob/master/docs/connectRoutes.md.

I suggest therefore:

  1. Remove usage of thunk in the minimal example, since it’s not used anyway
  2. Add some documentation for thunk and initialDispatch to https://github.com/faceyspacey/redux-first-router/blob/master/docs/connectRoutes.md#returned-values

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
geirsagbergcommented, Dec 5, 2018

@ScriptedAlchemy I would, but I don’t know how it works, therefore I can’t document it 😃

0reactions
geirsagbergcommented, Dec 9, 2018

Ah, gotcha. Thanks, I get it now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

connectRoutes - faceyspacey/redux-first-router
connectRoutes returns an object with a Redux store middleware, enhancer, ... well as describe the missing details about the toPath and fromPath functions....
Read more >
redux-first-router
I.e. you can use routes just for the purpose of the thunk feature, thereby achieving more uniformity across your async actions--just use RFR!...
Read more >
How to use the redux-first-router.connectRoutes function in ...
To help you get started, we've selected a few redux-first-router examples, based on popular ways it is used in public projects. Secure your...
Read more >
redux-first-router/CHANGELOG.md
Move doc about the bag option from docs/migration to docs/connectRoutes. 12, Improve options order based on priority and runtime order. 13.
Read more >
Redux-First Router data-fetching: solving the 80% use ...
your routesMap configuration — notice the thunk option ... the returned data; Dispatch an action function to your redux-thunk middleware ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found