总的来说,我对 React 和 Cuba 都很陌生。
我似乎无法让@cuba-platform/react-ui中的 FileUpload-Component正常工作。我不知道我做错了什么。
我总是收到以下错误:
Uncaught TypeError: Cannot read property 'getFileUploadURL' of undefined
at FileUploadComponent.render (index.esm.js:362)
at allowStateChanges (mobx.module.js:1146)
at index.module.js:951
at trackDerivedFunction (mobx.module.js:896)
at Reaction.track (mobx.module.js:2082)
at FileUploadComponent.reactiveRender [as render] (index.module.js:945)
at FileUploadComponent.makeComponentReactive (index.module.js:1015)
at FileUploadComponent.target.render (index.module.js:1196)
at finishClassComponent (react-dom.development.js:18484)
at updateClassComponent (react-dom.development.js:18439)
at beginWork$1 (react-dom.development.js:20176)
at HTMLUnknownElement.callCallback (react-dom.development.js:337)
at Object.invokeGuardedCallbackDev (react-dom.development.js:386)
at invokeGuardedCallback (react-dom.development.js:439)
at beginWork$$1 (react-dom.development.js:25777)
at performUnitOfWork (react-dom.development.js:24694)
at workLoopSync (react-dom.development.js:24667)
at performSyncWorkOnRoot (react-dom.development.js:24256)
at react-dom.development.js:12286
at unstable_runWithPriority (scheduler.development.js:704)
at runWithPriority$2 (react-dom.development.js:12232)
at flushSyncCallbackQueueImpl (react-dom.development.js:12281)
at flushSyncCallbackQueue (react-dom.development.js:12269)
at batchedUpdates$1 (react-dom.development.js:24377)
at reactionScheduler (mobx.module.js:2223)
at runReactions (mobx.module.js:2191)
at endBatch (mobx.module.js:1826)
at _endAction (mobx.module.js:1129)
at executeAction (mobx.module.js:1076)
at res (mobx.module.js:1060)
任何有关如何使用该组件的工作示例都会非常棒。提前致谢!
编辑:为澄清起见,我只是使用 FileUpload 组件,如下所示:<FileUpload />
这就是我所做的一切,但我感觉我在这里错过了一些重要的东西。文档对我也没有真正的帮助,因为我对 React 还很陌生,如前所述。
另外,我在互联网上找不到任何可以向我展示如何使用该组件的工作示例,所以我在这件事上很迷茫。如前所述,任何使用 FileUpload 组件的工作示例都会有很大帮助!
谢谢!