-
Several of my projects use reanimated seems notably different from other libraries in that I find I'm having to import "deep into the src tree" to get access to some types, instead of having a public API in index.ts that has everything. Am I wrong to be doing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Here are the "deep" imports I find myself using:
|
Beta Was this translation helpful? Give feedback.
-
Well, exposing KeyFrameProps would be very nice. I have some code that is building them. I can get around that one for now by use StyleProps, but I don't know that's true forever. And I need EntryOrExitLayoutType or at the least ReanimatedKeyframe. Since EntryOrExitLayoutType is in fact part of a public API (entering, exiting), it seems like it should be there. I need to declare types of things that might be passed to that public API. |
Beta Was this translation helpful? Give feedback.
It is interesting that you say:
In general, libraries should export everything what is necessary from the
index
file in their sources, so that everything can be imported directly. If some types aren't available, that means either someone forgot to export them or they are used internally and shouldn't be used by the library user.If you need some types that aren't available in the public API, you can always open a PR or ask us to export them. Alternatively, you can just copy the type definition from reanimated or other library and declare this t…