Question: How to use ObservableGroupMap in MST?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I do my first little baby steps with mobx / MST and can't get ObservableGroupMap working with MST.
Here is my example. I have an array in my state tree. This is by default an observable array, right?
Is it correct to initialize the ObservableGroupMap in the view function once and read from it in a view function?
Later I call the view function in an autorun. But the length of the (grouped) array is the same for ever.
https://codesandbox.io/s/competent-tu-1jyo8
Can anybody tell me what I am doing wrong?
Cheers
Thomas
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and inspect how ObservableGroupMap is initialized, how the MST observable array is read, and how the autorun invokes the view. Determine why the grouped array length does not update and document the correct usage or a reproducible fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100