mobx-state-tree: `process` is a very bad function name
Hello. Recently I faced with a bug in my code that I canโt make ReactHotLoader work because it uses process.env.NODE_ENV global variable to check an environment. But if you have import { process } from 'mobx-state-tree' require, webpack fails to inline process.env.NODE_ENV variable.
This is very bad because a lot of people may face it and itโs really hard to understand what is going on.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 15 (12 by maintainers)
in my case what iโm using is a map function to process:
so in your actions definition you can do this:
any tools out there that secretly inject flow globals ๐ ?
Op ma 25 sep. 2017 om 12:00 schreef Mattia Manzati <notifications@github.com
I like the abstraction behind the word:
activitybut I can live withflowtoo ๐Flow is a very good one!
@nickbreaton In the past it worked like that, but was changed due to problems imlied by transpilation. See #279.
What if it was renamed to
fromGeneratorToAsyncas suggested by @aretecode, but it was implied by using a generator function in actions.instead of
This can be detected by checking the constructor name: