Answers for "Import in body of module; reorder to top."

2

Import in body of module; reorder to top.

you will get this error if you have declared a variable in between your imports,

import React from 'react';
import axios from 'axios';

const URL = process.env.REACT_APP_API_BASE;

import demoXLXSFile from '../../assets/others/Demo.xlsx';
import './student.list.styles.scss';


declare variables after importing everything,

import React from 'react';
import axios from 'axios';
import demoXLXSFile from '../../assets/others/Demo.xlsx';
import './student.list.styles.scss';

const URL = process.env.REACT_APP_API_BASE;
Posted by: Guest on May-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language