chenglou / chenglou/react-state-stream
Adding new item to children example (App3) throws
- Dominant language
- JavaScript
- Stars
- 357
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
I added "Add new" button to the third example with the following handler:
``` js
handleAddClick: function () {
var items = this.state.items,
lastItem = items[items.length - 1] || '`'; // 'a' is next
items.push(String.fromCharCode(lastItem.charCodeAt(0) + 1));
items.sort();
this.setState({
items: items,
});
},
```
It throws with undefined `config` on [this line](https://github.com/chenglou/react-state-stream/blob/master/App3.jsx#L104).
I don't really understand Mori or lazy streams yet so I'd appreciate if you helped me figure out the issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by opening App3.jsx at the linked line and reproduce the failure by using the added "Add new" button. Read the surrounding children example and the handler to trace how the new item reaches the lazy stream, with attention to the Mori configuration mentioned in the report. Done means adding an item no longer throws and the new item appears in the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100