uppy/src
Renée Kooi d330c26813
react: Different way to do React components
This is a different approach to React components suggested by @arturi.
Instead of the components adding and removing plugins when mounting and
unmounting, plugins are configured at the start, and the components act
as slots for the plugins to actually mount in. Because all plugins are
still being configured up front here, we don't have to change how the
provider `target:` options work, they can install themselves into eg.
the Dashboard plugin immediately.

The core of this approach is the `UppyWrapper` component, which takes an
Uppy instance and a plugin ID, and mounts the plugin inside itself. The
other components only provide a default plugin ID.

The one change required in Uppy itself for this to work is to the
`mount()` functions: now, `mount()` configures `this.target` on the
plugins. If plugins do not have a `target:` option, they do not mount on
install. Some DOM code also had to be moved into the `mount()` function
for the DragDrop component instead of staying in `install()`, but I
think it makes sense.

(Still have to work out how to make the `DashboardModal` component's
`onRequestClose` option work.)
2017-09-18 14:40:32 +02:00
..
core Merge remote-tracking branch 'origin/master' 2017-09-15 23:56:18 -04:00
generic-provider-views show detailed error message for Uppy Server connection error 2017-08-29 22:45:45 +03:00
locales Merge pull request #278 from danmichaelo/trans-nb 2017-08-13 16:28:56 +03:00
plugins react: Different way to do React components 2017-09-18 14:40:32 +02:00
scss Only apply Dashboard modal z-indexes in modal mode. 2017-09-18 14:37:41 +02:00
uppy-base providers: consistently use sticky hostname 2017-08-17 12:13:20 +02:00
uppy-react react: Different way to do React components 2017-09-18 14:40:32 +02:00
vendor/file-type add license and package.json 2017-06-14 17:14:10 -04:00
index.js Include RestoreFiles in unpkg bundle. 2017-08-30 13:58:41 +02:00