@rpldy/native-uploady
Installation
- npm
- Yarn
- pnpm
npm install @rpldy/native-uploady
yarn add @rpldy/native-uploady
pnpm add @rpldy/native-uploady
Details
This is the main UI package for React-Native. Its role is to initialize and expose the uploader functionality. It contains the Provider that all other UI packages rely on.
It provides multiple hooks that enable more advanced features and data for client apps.
note
The difference between this package and the main Uploady is that this one doesn't use react-dom (for obvious reasons) and doesn't create a file input element.
Example
To be able to use one of the UI Components or one of the hooks, you need to wrap them with Uploady. This will give them access to the UploadyContext.
import React from "react";
import NativeUploady from "@rpldy/native-uploady";
const App = () => (<NativeUploady
grouped
maxGroupSize={2}
method="PUT"
destination={{ url: "https://my-server", headers: { "x-custom": "123" } }}>
<Upload/>
<RestOfMyApp/>
</NativeUploady>)
Exports
info