You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where my-project is using a hook that is exported from shared-lib/src/mobile. The thing I want to get working in my RN project is to be able to include modules from my local package shared-lib/src/mobile that I added as a dependency in my-project with yarn add ../shared-lib.
Now, this is the strange thing: when I use npm and start my app it results in "Warning invalid hook call" which is a very well known issue. Though when I use yarn to install the dependencies of my shared lib and app, things work fine!
I'm happy that things work, but I rather know exactly why yarn works and npm fails. Does someone have an idea why?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm working on a react native project where I have a directory structure like this:
Where
my-project
is using a hook that is exported fromshared-lib/src/mobile
. The thing I want to get working in my RN project is to be able to include modules from my local packageshared-lib/src/mobile
that I added as a dependency inmy-project
withyarn add ../shared-lib
.Now, this is the strange thing: when I use npm and start my app it results in "Warning invalid hook call" which is a very well known issue. Though when I use yarn to install the dependencies of my shared lib and app, things work fine!
I'm happy that things work, but I rather know exactly why yarn works and npm fails. Does someone have an idea why?
Beta Was this translation helpful? Give feedback.
All reactions