Questions tagged [easy-peasy]

"Easy Peasy provides you with an intuitive API to quickly and easily manage the state for your React application. Batteries are included - no configuration is required to support derived state, API calls, performance optimisation, developer tools etc."

50 questions
0
votes
1 answer

Calling action from another action

I have a sub-store as info: {}, data: {}, items: [], I have created 3 actions to reset the above shown individual properties: resetInfo:action((state, payload) => { state.info = {}; }), resetData: action((state, payload) => { state.data…
Varun Sukheja
  • 6,170
  • 5
  • 51
  • 93
0
votes
1 answer

How can I avoid cyclic dependency which occurs on importing the store while using easy-peasy redux library?

Importing stores after creating it causes this problem. store.ts /** * Author: Rahul Shetty * * The central redux store of our app is created and exported to be used from * here. */ import { createStore, persist } from 'easy-peasy'; import {…
shet_tayyy
  • 5,366
  • 11
  • 44
  • 82
0
votes
1 answer

Easy-peasy - unable to return new state

Why can't I return the new state in this way (reset action)? export interface TodosModel { items: string[]; reset: Action; } const todos: TodosModel = { items: [], // This action does not update the state reset: action(() =>…
Adee
  • 357
  • 1
  • 3
  • 13
0
votes
1 answer

use redux-form with easy-peasy

Is it possible to use redux-form with easy-peasy? I try it like this // @flow import { type TRootReducer, } from './TRootReducer'; import { createStore, reducer, } from 'easy-peasy'; import createHistory from…
Hayk Safaryan
  • 1,996
  • 3
  • 29
  • 51
-1
votes
1 answer

How to test existing React Store

I use Redux powered by "easy peasy". I am trying to test existing React Store. Particularly I need to test the thunk part of store with thunk that I need to test ... clients: [], ... loadClients: thunk(async (actions) => { try…
leotim
  • 61
  • 1
  • 1
  • 7
1 2 3
4