I'm trying to use this lib in a TypeScript project and when compiling, I get this error:
$ npm run tsc
...
node_modules/redux-persist/types/integration/react.d.ts:24:29 - error TS2304: Cannot find name 'React'.
24 class PersistGate extends React.PureComponent<PersistGateProps, PersistorGateState> {}
Shouldn't this line be class PersistGate extends PureComponent<...?
I'm using TypeScript 3.4.5.
Also, I'm absolutely new to TypeScript. Any suggestion would be appreciated and I can provide a PR if it's indeed an error.
Adding @types/react fixes the issue (npm install --save-dev @types/react).
But I think the type definition issue should still be fixed.
we may need to split apart the react integration into its own package. Basically we have issues with the implicit peer dep that only exists if you use the react integration and hence we dont want to enforce on redux-persist.
Would appreciate the splitting of react integration. Getting this over here:
node_modules/redux-persist/types/integration/react.d.ts(2,44): error TS2307: Cannot find module 'react'.
Hey, happy new year. A small feedback if this is being considered any time soon would be awesome. Thanks!
Most helpful comment
we may need to split apart the react integration into its own package. Basically we have issues with the implicit peer dep that only exists if you use the react integration and hence we dont want to enforce on redux-persist.