Comments (5)
from use-immer.
from use-immer.
I believe the error is not due to using a string index accessor with an array, but rather due to limitations of Immer when setting properties on Record objects directly.
For your information, selectedTab is of the number type, and the provided workaround wouldn't have worked if the issue was coming from there.
I'm using:
"immer": "^9.0.21",
"use-immer": "^0.8.1",
"typescript": "^4.9.3",
from use-immer.
from use-immer.
Hey again, I've been digging around and found that at initialization I was still using an array instead of an object. I believe TS was not failing at buildtime, cause I've messed up with the location of the Interface. Now it's working correctly, thanks for your help though!
from use-immer.
Related Issues (20)
- changelog HOT 2
- `source is undefined` when calling a nested mutation in a custom hook from a library when using immer 9.0.13+ HOT 1
- Enhance `userImmerReducer`'s type by providing function overloads HOT 4
- i have an error Immer only supports setting array indices and the 'length' property HOT 1
- Passing event directly results in strange values inside state change function while running tests HOT 3
- [QA]how to complete a use-immer with uncontrolledValue?
- how to integrate redo undo ? HOT 1
- When the state is a reference type stored in an array, it cannot be obtained when modifying HOT 4
- Target ESM over CommonJS HOT 5
- 老项目使用0.7版本重新安装依赖会报错
- addition to docs HOT 1
- When using setState nesting, run log setState will execute multiple times HOT 1
- useImmerReducer cant handle initialState being null? HOT 1
- [Question] Using union type in useImmerReducer
- Incorrect immer peer dependency
- Umd version doesn't work
- vscode auto import HOT 1
- Attempted import error: 'freeze' is not exported from 'immer' (imported as 'r'). HOT 8
- Add React 18 as peer dependency. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-immer.