Skip to content

Suggestion: Examples for new redux hooks and react-router hooks #196

Closed
@C-Higgins

Description

@C-Higgins

Redux and React-Router have introduced new hooks that drastically change the standard patterns:

https://react-redux.js.org/api/hooks

https://reacttraining.com/blog/react-router-v5-1/

Some of these benefit from extra typescript typings that this guide could help with, such as useDispatch requiring you to pass the type of the dispatch for action type safety, or useSelector benefiting from a type override so you don't have to type the state parameter each call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions