Text Sliders front-end using React

I’m learning basics of react and currently im exploring certain problem statements available on the internet. One such problem statement required me to create a react app for a text slide creator with previous , next and reset buttons. I was able to create till here – My app.js file looks something like this- and my SlideComponent.js looks something like – and my ‘MyComponent.js’ looks something like this – and the JSON file in which i wish to render the text slides from looks something like – I have basic knowledge about states and props and useEffect() components and also

Is it safe to render a react portal into another component DOM?

Consider the following example: Is it safe to render a portal inside other components DOM? I’ve tested it and it works, but I don’t know if this is reliable. The Portals doc mention that you can render a portal in a DOM node but nothing about components DOM. Why is this different (speculating here)? while updating the portal parent component, in the reconciliation process the diff might find the inconsistency and remove the portal node. From my testing, the above doesn’t happen but I don’t know if I can assume that react handles it. So here comes the Q: Is