Animal Fun Facts Task 5 - Nothing renders to DOM when trying to include image

Hi guys I’m just in the throws of learning JSX while completing my first project task (Animal Fun Facts 5). However my code returns no content in the browser. I can’t see anything wrong with the code myself and I’m beginning to think it’s a glitch, if anyone can assist that would be much appreciated!!
Thanks
(Pasted in JS but JSX syntax)

import { animals } from './animals'; import React from 'react'; import ReactDOM from 'react-dom'; const title = ''; const background = ( <img className='background' alt='ocean' src='/images/ocean.jpg’ /> ) const animalFacts = ( <div> <h1>{title == '' ? 'Click an animal for a fun fact': title}</h1> {background} </div> ) ReactDOM.render(animalFacts, document.getElementById('root'));

Hi,
an empty page is a common error in this project and mostly caused by code errors.
Can you please post a link to the project?
Do you see an error in the console? (Open the browser’s console – it shows all logs of the whole Codecademy page, including those occuring in your project.)

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.