Closed kj-1809 closed 1 year ago
Since it's a peerDependency, @uploadthing/react
doesn't bundle react-dropzone
. But since it imports from it, the package must be installed somehow - by the user.
This is similar to for example @trpc/react-query
does for tanstack. You might not ever import directly from @tanstack/react-query
but trpc needs it.
As to why its not bundled by default, well if you need more functionality than what's bundled by uploadthing, you'd then need to install the package manually. This would potentially lead to a version mismatch between the one bundled in uploadthing and the one used by you. Thats why we use peer dependencies.
Thanks . That makes sense !
I am probably asking a stupid beginner question , we have react-dropzone in our dependencies in the package folder right so why do we need to install it if we are not using it client side anyway ? won't it automatically import it internally ?