I want to do is I want to import React-Native dynamic path.
example:
import Demo from `./screens/${path}`; I found one method using lazy, but it also only working when initialize const variable like this
const demo = 'Path'; let componentPath = `../Screen/${demo}`; const DynamicComponent = React.lazy(() => import(componentPath) .then(module => ({ default: module.screen })), ); I want to get path by async storage saved variable, not like hard code variable. When I hard code variable it works, but I could not get it from async storage. I have tried to find any method to do it.