Immer only supports setting array indices and the 'length' property
What types of things would cause Immer only supports setting array indices and the 'length' property' from the code below? This FoodLogState type is a class. I've done something very similar with no issue. I notice I am not updating even the array from state yet. Only the status that is a string. import { createAsyncThunk, createSlice } from "@reduxjs/toolkit"; import { FoodLogState, getFoodState } from "../AccountAPI"; export interface FoodLogs { foodLogs: Array<FoodLogState>; status: "idle" | "loading" | "failed"; } const initialState: FoodLogs = { foodLogs: null, status: "idle", }; export c
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.