Home javascript Redux CreateStore does not work

Redux CreateStore does not work




Can’t create Store , gives an error (see Screenshots) .

index.js file

import store from './redux/store-redux';
Import ReactDom from 'React-Dom';
Import './index.css';
Import app from './app';
Let Renderpage = (State) = & gt; {
  Reactdom.render (
   & lt; react.strictmode & gt;
     & lt; app Store = {Store}
       pageMessages = {state.pageMessages}
     PostSData = {state.pageProfile.postsdata}
     PostValue = {state.pageProfile.postvalue}
     dispatch = {store.dispatch.bind (Store)} / & gt;
   & lt; /react.strictmode>
   Document.GetElementByid ('root')
RENDERPAGE (Store.getState ());
Store.Subscribe (() = & gt; {
  Let State = Store.getState ();

Store-Redux File

import {combinereducers, createstore} from "redux";
Import MessagesRducer from "../Reducers/PageMessagesReducer";
Import ProfileRecer from "../Reducers/PageProfileReDucer";
Let ReduCers = CombinereduCers ({
  PageMessages: MessagesReducer,
  PageProfile: ProfileRecer.
Let Store = CreateStore (ReduCers);
Window.Store = Store;

Answer 1

There are so many options why this can happen.

  1. you have react.strictmode described, but nowhere is not described by the import of the reaction (if it is done globally, then the problem is not in this)
  2. can influence the Store-Redux file extension if it is a JS file, then the problem is not in this
  3. can affect the left library (which is unlikely) Link

In general, your code worker Example

Probably problem in WebPack or import settings.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions