prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

feat(types): add generic to FirestoreReducer Reducer interface #1095

Closed SamPoate closed 9 months ago

SamPoate commented 3 years ago

Description

Adds the ability to define the interface for FirestoreReducer Reducer interface.

I am new to this, so please do leave any feedback.

Check List

If not relevant to pull request, check off as complete

Relevant Issues

prescottprue commented 2 years ago

Thanks for the change, I really like the idea! I thought we looked into something like this before, but can't find it.

Unless I'm misunderstanding, I believe this will require a type be passed to the reducer, which means a breaking change to the external API. I'll put this on the list for a next major version, but if we can think of a way to support this in a backwards compatible way we can get it in!