Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70443

How works with react ionic native elements

$
0
0

@jhoncbernal wrote:

I had problems with react in ionic to use de File transfer someone can help me?

import { FileTransfer, FileUploadOptions, FileTransferObject } from ‘@ionic-native/file-transfer’;
export class FileFormPage extends React.Component<{},
{ http:HTTP,
file: any,
showToast1: boolean,
loginMessage: string,
hiddenbar: boolean,
}> {
constructor(props: any,private http: HTTP,private transfer: FileTransfer) {
super(props);
this.state = {
http:http,
file: ‘’,
showToast1: false,
loginMessage: ‘’,
hiddenbar: true,
}
}
async handleSubmit(e: FormEvent) {
e.preventDefault();
try {
const fileTransfer: FileTransferObject = this.transfer.create(); “Cannot read property ‘create’ of undefined”
or if i change the import

TypeScript error in /Users/jhoncasallas/Documents/OwnCode/VecinoIonic/src/components/FileForm.tsx(22,69):
Cannot find module ‘@ionic-native/file-transfer/ngx’. TS2307
20 | import { execFile } from ‘child_process’;
21 | import { File } from ‘@ionic-native/file’;

22 | import { FileTransfer, FileUploadOptions, FileTransferObject } from ‘@ionic-native/file-transfer/ngx’

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>