Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React MobX error with 08_create1k-after10k #427

Closed
krausest opened this issue Jul 29, 2018 · 0 comments · Fixed by #450
Closed

React MobX error with 08_create1k-after10k #427

krausest opened this issue Jul 29, 2018 · 0 comments · Fixed by #450

Comments

@krausest
Copy link
Owner

Currently the benchmark 08_create1k-after10k fails and quite a strange way after updating react and mobX (5.0.3, no matter if react 16.1 or react 16.4). It worked fine with mobX 3.3.1.
Creating 10,000 rows and then appending 1,000 causes a loss of the first 10,000 rows. If I change the number of rows created at first to 1,000 it works as expected - sounds strange.

Click create 10,000 rows:
bildschirmfoto 2018-07-29 um 09 06 49
As expected there are 10,000 rows. Then click on append rows:
bildschirmfoto 2018-07-29 um 09 07 03
Here the strange thing happens. This is the modified add action:

    @action add() {
        console.log("store.add length before", this.data.length);
        this.data = this.data.concat(this.buildData(1000));
        console.log("store.add length after", this.data.length);
    }

It shows that there are 10,000 rows in the store after the add call. But as one can see the row ids have changed and only 1,000 rows are left.
Fun fact: It works correctly for any row count < 10.000
@mweststrate Can you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant