Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin.mount is not a function #3756

Closed
ogradye opened this issue May 19, 2022 · 1 comment
Closed

plugin.mount is not a function #3756

ogradye opened this issue May 19, 2022 · 1 comment
Labels

Comments

@ogradye
Copy link

ogradye commented May 19, 2022

Uppy React version: 2.2.0

When trying to use the XHRUpload plugin with Uppy react I am given a plugin.mount is not a function error.

Here is my integration

const uppy = useMemo(() => {
		return new Uppy()
			.use(XHRUpload, {
				id: 'XHRUpload',
				endpoint: 'http://my-website.org/upload',
			})
	}, [])

	useEffect(() => {
		return () => uppy.close({ reason: 'unmount' })
	}, [uppy])

<Dashboard uppy={uppy} width="100%" plugins={['XHRUpload']} /> If I remove the plugins prop from the Dashboard component, this error does not occur and XHR Upload seems to function correctly. But this does not conform to the documentation.

@Murderlon
Copy link
Member

It is not properly documented but plugins in the React setup is only for UI plugins that need to mount into the Dashboard. You don't need to do that for upload plugins. We are working on a new docs website so things will be clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants