I’m pulling my hair out trying to figure out what the issue is.
Even deleting code so it doesn’t render anything doesn’t change what gets shown on the screen.
Tried new private browser and now even the first step doesn’t work
This is not valid JSX (Check the key attribute and the template literals):
And this won’t work. You cannot use JS injections within the html tag itself. And it would neither increase performance nor readability to define the image tag in two steps if it worked in the first place, so you should do that in one step:
And last, the function should only be referenced here, not invoked (in addition to not using template literals here):
Please, I’m experiencing the same issue, and can’t even get past the first stage of rendering the H1 element.
I have followed what was shown in the video, but still nothing renders in the local host page.
It is just blank
import { animals } from './animals';
import { React } from 'react'
import { createRoot } 'react-dom/client'
const container = document.getElementById("app");
const root = createRoot(container);
const title = '';
const animalFacts = (<h1>{title === '' ? 'Click an Animal for fun facts.' : title}</h1>);
root.render(animalFacts);