↧
Answer by MAHESH PALIWAL for Unable to import directory in React
To import every file you need to add one more slash. it should be ./util/ .You are missing a slashBy default in your case react is importing util/index.jsimport * as All from './util/'other ways...
View ArticleAnswer by Quentin for Unable to import directory in React
You need an index.js inside the util directory.It should import everything from all the other files and then export them again.
View ArticleUnable to import directory in React
My file layout is as follows:// Folder structure:// |-src// |-util// |-index.js// |-PageScreen1.js// |-PageScreen2.js (and etc...)// |-PageScreen.js// |-index.jsI would like to import all of util into...
View Article