jotai-devtools icon indicating copy to clipboard operation
jotai-devtools copied to clipboard

refactor(utils): extract useReduxConnection for less repetition

Open PrettyCoffee opened this issue 1 year ago • 1 comments

Chunk of this PR: https://github.com/jotaijs/jotai-devtools/pull/32

This will extract the repeated logic of useAtomDevtools and useAtomsDevtools regarding the initial connection to the redux extension into a shared custom hook. It will be helpful to implement consistent behavior for both hooks. 🙂

(for example when https://github.com/reduxjs/redux-devtools/issues/1370 is fixed or #32 is implemented as temporary solution or if there is any other solution for the duplicated connection problem)

This is only a refactoring, it should not introduce any behavioral changes.

PrettyCoffee avatar Mar 19 '23 21:03 PrettyCoffee