0
I would like to know why when I use the Preview like this
//Root.js
import React from 'react';
import { combineReducers, createStore, applyMiddleware } from "redux"
import { listaDesejosList, listaDesejosEdit } from "./src/reducers/reducers"
import customMiddleware from "./src/commons/custom-middleware"
import App from "./App"
import { Provider } from 'react-redux';
const rootReducer = combineReducers({
listaDesejos: listaDesejosList,
desejo: listaDesejosEdit
})
export const store = createStore(rootReducer, applyMiddleware(customMiddleware))
const Root = () => {
return (
<Provider store={store}>
<App />
</Provider>
)
}
export default Root;
And I try to use in registerComponent so:
//index.js
import { AppRegistry } from 'react-native';
import Root from './Root';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, <App/>);
This error occurs
could not find react-redux context value; please ensure the component is wrapped in a `<Provider>`
I ask because I am making an app in reactjs and React Activate and I would like to keep a certain standard in the code