Hi, i am creating a view with an html coming from an .html file that i have in a folder (‘html’); so far i am using it with require:
An extract from my react component:
var contents = require("./html/popup.html");
return (
<WebView
source={contents}
style={{ height: 100, width: 100 }}
/>
)
I’d like to load the content of the file to make some string interpolation (to my knowledge, i cannot pass variables to the html contents of the file, that’s the reason why i need it).
I am trying to use FileSystem.readAsStringAsync
but i am not understanding where that function will be looking in the project folder.
Thanks