Decoupling from react and react-native
See original GitHub issueI’m trying to integrate redux-persist (5.10.0) (I haven’t used it before so sorry if I’m doing an obvious mistake) into an external node module, which will be shared by an iOS app and web app.
I’ve installed redux-persist, configured it, and ran. I get:
node_modules/redux-persist/src/index.d.ts:69:46 - error TS2307: Cannot find module 'react'.
69 import { ReactNode, PureComponent } from "react";
~~~~~~~
node_modules/redux-persist/src/index.d.ts:91:38 - error TS2304: Cannot find name 'React'.
91 export class PersistGate extends React.PureComponent<PersistGateProps, PersistorGateState> { }
How do I configure my package that it doesn’t require either React or Reach Native?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Decoupling Logic From React Components | by Daniel Kiesshau
There are 6 ways (explored in this article) to achieve the decoupling. Each of them have their pros and cons. And we should...
Read more >Build Decoupled React Components with Inversion of Control
I hope that this article helped you to understand how to use inversion of control with react and how to decouple your code...
Read more >How To Decouple Data from UI in React | by Suhan Wijaya
In Part 1, I presented an approach to decouple the data fetching/management layer from a React component that renders some UI based on...
Read more >React: decoupling UI and business logic - YouTube
Hello everyone and welcome to our third stream! At the end of our last stream we managed to have a working React form,...
Read more >Decoupling Drupal with React Native - YouTube
In this session, we talk about decoupling Drupal and building a Decoupled Days event application in React Native, with Redux, Redux-thunk ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rt2zz I’ve installed
@next
(+ redux-persist@6.0.0-pre1), but still getting the same error:Same here using Stencil JS. I comment out react related stuff for now which is really dirty.