SyntaxError: 'import' and 'export' may only appear at the top level
Opened this issue · 0 comments
naisargparmar commented
I am using react 16.8.6. My code is working fine but I am getting syntax error. jsfmt don't support below import code.
exportCsv = () => {
this.setState({ isExporting: true });
import('./exportToCsvV2').then(bundle => {
try {
// some code
} catch (e) {
throw e;
}
});
};