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

migrate mobx to peer and dev dependencies #2979

Merged
merged 2 commits into from
Jun 7, 2018
Merged

Conversation

heralight
Copy link
Contributor

To avoid mobx update dependency everytime and to not force projects to upgrade with RNRF...

A far more better option is to change these dependencies to peer dependencies ...
Mobx Issue and related docs:
mobxjs/mobx#1082

Mobx docs:

If there should be only one mobx instance (libraries should cooperate & react to each other)
Use peer dependencies

@aksonov
Copy link
Owner

aksonov commented May 14, 2018

Does it require different setup process for end user who doesn't use mobx?

@heralight
Copy link
Contributor Author

Sorry, I missed your question...

In recent versions peer dependencies will not be installed automatically, but user will be pointed out that he should install them. So he has to install yarn mobx mobx-react. But it is the only correct thing to do, otherwise he cannot (properly) update mobx versions etc without you releasing a different version from rnrf.

@aksonov
Copy link
Owner

aksonov commented Jun 6, 2018

What about following idea - clone this repo and use react-native-router-mobx with peer mobx dependencies (who are using mobx in their projects) and use normal dependencies for this project (for everybody who don't use mobx) ?

@heralight
Copy link
Contributor Author

I already done this (my fork, my push, as you can see in this push request, I use it directly in my projects). but how it's done actually in react-native-router-mobx with normal mobx dependencies, it's clearly not the right direction. and I don't understand the limitation for everybody who don't use mobx, it's one line to set up to have flexibility and no more mobx maintenance...

@aksonov
Copy link
Owner

aksonov commented Jun 7, 2018

Ok, let's try your way, could you update README ?

@aksonov aksonov merged commit ed12ab7 into aksonov:master Jun 7, 2018
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 this pull request may close these issues.

2 participants