react-native-web
react-native-web copied to clipboard
refactor(deps): removing fbjs dependency by creating a local module for invariant and warning
As part of https://github.com/necolas/react-native-web/issues/2333, invariant
and warning
are the last two dependencies in the project used from fbjs
and removing them allows removing that external dependency.
In this PR:
- Local module for
invariant
and replacing the imports - Local module for
warning
which had another dependency ofemptyFunction
hence it has been added as well. -
fbjs
dependency has been removed frompackages/react-native-web/package.json
.
I can still see fbjs
in the main package-lock.json
as there are other packages within the repo that have react-native-web
installed as a dependency, hence it might potentially be removed once that dependency is upgraded as well.
Ps: I did the replacement of warning
in the same PR as it was fairly small, but happy to split this up in another PR if needed.