-
-
Notifications
You must be signed in to change notification settings - Fork 349
Component is not updating after store change (via axios) #381
Comments
Can you elaborate a bit? What steps do I need to do to reproduce? Which files are relevant? Are there any warnings / errors in your console? |
Thanks @mweststrate & sorry for the missing steps to reproduce the issue. Please find the steps below: git clone https://github.com/jimzhan/mobx-react-issue
cd mobx-react-issue && npm install && npm start There is no any warning & error message after that. Actually I can see the store ( |
@jimzhan I looked at the transpiled code and the decorator call didn't seem to be actually transpiled. But is there a reason you aren't using the prebuilt config for rewired? https://github.com/timarney/react-app-rewired/tree/master/packages/react-app-rewire-mobx |
Thanks @mweststrate for the prompt response, if you look into |
Yes it does, but declaring a field in a class might need a separate
transformation. It is not that decorators are not transpiled, the problem
seems that the field declaration is entirely missing, which is a separate
transformation as well (yeah I hate babel for this, TS just has some
boolean flags and be done with it). So I think the basics are right, but
some is still missing. That is why I recommend using something somebody
else has figured out already :)
Op wo 27 dec. 2017 om 11:40 schreef Jim Zhan <[email protected]>:
… Thanks @mweststrate <https://github.com/mweststrate> for the prompt
response, if you look into config-overrides.js, I've already include
transform-decorators-legacy, I suppose this is exactly the same as
react-app-rewire-mobx you shared already?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#381 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvGhLU2_MeqJvIWNMQ-PPbQo_2vOoXiks5tEh6fgaJpZM4RL7ay>
.
|
@mweststrate switching to |
@jimzhan how to disable that annoying compile error if a linting rule isn't obeyed? Makes it pretty impossible to test anything without disabling my IDE configs.... |
guess you can remove "eslintConfig" from |
Something is really of in the project, the most basic debugger things don't work in the browser :( |
Hmm in your |
tricky part is, I overwrite my |
ok, swapping |
...which is because https://github.com/timarney/react-app-rewired/blob/b2458a6df60136c4bbbb9e5e15dd107d035e40ff/packages/react-app-rewired/index.js#L30 will add new plugins in front of the list, since you added This also works and is more explicit in any case:
|
indeed, thanks :-) |
@mweststrate thinking in the next rewire version we can alter so it will push plugins in so they don't end up in front and add a warning to rewire-mobx mentioning that it needs to be first in the config. |
Sample Repository
Env create-react-app + react-app-rewired
Versions
The text was updated successfully, but these errors were encountered: