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

Components do not respond to changes in the mobx stores #1199

Closed
sxwebdev opened this issue Aug 30, 2017 · 10 comments
Closed

Components do not respond to changes in the mobx stores #1199

sxwebdev opened this issue Aug 30, 2017 · 10 comments

Comments

@sxwebdev
Copy link

After I upgraded to 3.8.1 from 3.7.1, my components stopped responding to changes in the mobx stores. Why did it happen?

@FQ400
Copy link
Contributor

FQ400 commented Aug 30, 2017

I have a similar issue. But more precice. The update seems to be delayed for one update cycle.

Tracetable, for example:
initial state 0 -> not shown
update state to 1 -> 0 shown
update state to 2 -> 1 shown

I updated from 3.8.0 to 3.8.1.

Edit: I was wrong. 3.7.1 to 3.8.1

@Havunen
Copy link
Member

Havunen commented Aug 30, 2017

Can you guys create jsFiddle or similar test case to reproduce it please

@linh1987
Copy link

linh1987 commented Aug 30, 2017

After inspecting the dist of inferno-mobx, it seems like we have a problem with this build. The makeReactive function is empty, maybe an issue with rollup?:

function useStaticRendering(boolean) {
    
}
function makeReactive(componentClass) {
    return componentClass;
}

@Havunen
Copy link
Member

Havunen commented Aug 30, 2017

thats very possible, rollup was updated between these versions

@Havunen
Copy link
Member

Havunen commented Aug 30, 2017

Yup, this was caused by rollup upgrade. They changed tree shaking algorithm and caused this bug. I will downgrade rollup and make new release.

@Havunen
Copy link
Member

Havunen commented Aug 30, 2017

Its fixed now in 3.8.2 but lets keep this bug open for reference

@FQ400
Copy link
Contributor

FQ400 commented Aug 30, 2017

I really appreciate that the issue is found. I struggle a bit with the jsfiddle example. Here is what I have: https://jsfiddle.net/1kf4ftzc/8/

Currently it doesn't work because. 😞 I am still figuring it out. But assuming all the needed functions where available, this would be a fiddle. :)
Maybe we can provide a basic setup for future issues?

@leeoniya
Copy link

leeoniya commented Aug 30, 2017

0.49.2 fixed some more regressions, btw.

rollup/rollup#1592

@Havunen
Copy link
Member

Havunen commented Aug 31, 2017

Ideally we should run our tests against the bundle we ship. Currently however we run the tests against typescript sources compiled by typescript compiler, but rollup is not part of this process. Also debugging is really difficult at the moment and I had to fork ts-jest to be able to debug. We used to use Karma for testing which was better than Jest IMO. at least for inferno project. Jest is also bound to js-dom which lacks some functionality. It would be nice if somebody could renew this test setup. I will create new issue for that

@Havunen
Copy link
Member

Havunen commented Sep 10, 2017

Closing this issue now as rollup has fixed it in 0.49.3

@Havunen Havunen closed this as completed Sep 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants