Possibility to create npm package relying on Expo libraries

Hey. I think I’ve got some really useful components that use expo and I wanted to open source them.

One of them is SuperImage:

My question is, is it possible to include expo libraries and still create an npm package from it so people can add them using yarn add / npm install? Or is the only way to open source expo stuff to use snack and make people copy paste it instead of really using your library?

Also, my library relies on a redux store. Is it possible to create and persist-cache this store within the library, or should I add instructions to add the redux reducer to your own store?

If someone knows more about this, please assist. Thanks!


One of my friends suggested that I could import expo as a prop to the component, like <SuperImage expo={Expo} />, this may work, but is kind of ugly I think. However, I see no other way as of now so I think I’m going to try it.

I think we have to wait for this:

I did it this way now: it requires an expo prop with the whole expo lib.

Quite happy with the result. If anyone has a better solution, lemmeno

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.