Giter VIP home page Giter VIP logo

Comments (6)

jakubrohleder avatar jakubrohleder commented on May 18, 2024 1

I've just found this issue, I think it should help you: piotrwitek/typesafe-actions#4

from react-redux-typescript-guide.

piotrwitek avatar piotrwitek commented on May 18, 2024 1

Hello @lsentkiewicz
Sorry but RootAction is currently outdated.

I'm in the middle of rework of entire action creators and reducer section as I made a few improvements in typing patterns for them, so expect a new solution soon.

At this moment you can check the issue linked above or check the RootAction file that is located in the Playground Project: https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/redux/root-action.ts

from react-redux-typescript-guide.

lstkz avatar lstkz commented on May 18, 2024 1

In the current readme.md

export const allActions = {
  ...countersAC,
  ...todosAC,
  ...toastsAC,
};

const returnOfActions =
  Object.values(allActions).map(getReturnOfExpression);

should be changed to

export const allActions = [
  ...Object.values(countersAC),
  ...Object.values(todosAC),
  ...Object.values(toastsAC),
];

const returnOfActions = allActions.map(getReturnOfExpression);

because multiple modules can contain the same names.
Example countersAC.loaded() and todosAC.loaded(), and duplicated names are overriden.

from react-redux-typescript-guide.

piotrwitek avatar piotrwitek commented on May 18, 2024

Please check a new and updated Store Configuration Section

from react-redux-typescript-guide.

lstkz avatar lstkz commented on May 18, 2024

thanks @piotrwitek!

from react-redux-typescript-guide.

piotrwitek avatar piotrwitek commented on May 18, 2024

@lsentkiewicz yes that make sense, thanks!
I'll update it with the next PR which I'm working on right now.

from react-redux-typescript-guide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.