Answer the question
In order to leave comments, you need to log in
How to dynamically load json files from a project folder?
There are json files
1.json
2.json
3.json
и т.д.
var ob = require('1.json');
var fn = category_id + '.json';
var ob = require(fn);
Answer the question
In order to leave comments, you need to log in
here is your problem and a solution
https://dev.to/emilios1995/dynamic-imports-in-reac...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question