I am learning React Native and want to build an app (Android and IOS) that will build the components within the main View when the page loads, pulling the data for each component from a JSON file.
Eg the JSON for that page might have 3 text items and an image, and the load would then build those components and they would display on the page.
Would that be possible and if so, how where should I put the code to do this - eg Hooks, useEffect() within the View component? Woud that be an issue as I believe useEffect would be called twice - once before the new components are added and then again after.
Also, ideally, the components might be embedded - eg a component with another one embedded for different styling, or for a link eg
<Text style={mainStyles.heading}>a test <Text style={mainStyles.p}>embedded</Text> text component</Text>
or
<Text style={mainStyles.heading}>a URL link <Text style={mainStyles.p} onPress={() => Linking.openURL("https://www.microsoft.com")}> Microsoft</Text> text component</Text>
Finally, when navigating between pages, it would need to have some way of passing a value to the incoming page so it knows which JSON to import (ie in web terms, a query string, cookie or local storage value)
Would this be possible?