uppy/examples/react-example
Artur Paikin 8b252086f5
@uppy/dashboard: auto discover and install plugins without target (#4343)
* Dashboard: auto discover plugins no matter when they were installed

* Remove target from RemoteSoruces, making it compatible with @uppy/react

* Update packages/@uppy/dashboard/src/Dashboard.jsx

Co-authored-by: Mikael Finstad <finstaden@gmail.com>

* Removed comments, added comments

* better comment

* Change type — otherwise gets listed on Dashboard sources

* Add RemoteSources to React test

* Add RemoteSources to React example

* Add tests

* Refactor for less iteration for each plugin, rename functions

* Prevent error when opts are undefined

* remove console.logs

* prettier

---------

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2023-10-12 23:19:40 +01:00
..
App.jsx @uppy/dashboard: auto discover and install plugins without target (#4343) 2023-10-12 23:19:40 +01:00
index.html meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
main.jsx example: upgrade React example to use React 18 (#4002) 2022-08-22 20:02:49 +02:00
package.json meta: upgrade to Vite 4 and ESBuild 0.16 (#4243) 2022-12-13 15:07:19 +01:00
README.md example: upgrade React example to use React 18 (#4002) 2022-08-22 20:02:49 +02:00
vite.config.js example: upgrade React example to use React 18 (#4002) 2022-08-22 20:02:49 +02:00

React example

This is minimal example created to demonstrate how to integrate Uppy in your React app.

To spawn the demo, use the following commands:

corepack yarn install
corepack yarn build
corepack yarn workspace @uppy-example/react dev

If you'd like to use a different package manager than Yarn (e.g. npm) to work with this example, you can extract it from the workspace like this:

corepack yarn workspace @uppy-example/react pack

# The above command should have create a .tgz file, we're going to extract it to
# a new directory outside of the Uppy workspace.
mkdir ../react-example
tar -xzf examples/react-example/package.tgz -C ../react-example --strip-components 1
rm -f examples/react-example/package.tgz

# Now you can leave the Uppy workspace and use the example as a standalone JS project:
cd ../react-example
npm i
npm run dev