Hello.
I’m following a tutorial on YouTube to get started with ReactJS. I’ve downloaded the starter template from reactjs.org I just want to see my first "Hello World! on the screen. But I fail.
I have an index.html file.
And I have the app.js file.
Please, check screenshots below.
Why it doesn’t work? I reviewed several times my tutorial. I don’t understand what is wrong with my code.
Could you please help. Can’t wait to get start and to move further
The extends clause accepts any expression. So you can put just about anything there, including a function (invoked with parens) that you can call and return a class with.
class Animal {}
class FeralAnimal {}
function getAnimal () {
return Math.random() < 0.5 ? Animal : FeralAnimal;
}
class Cat extends getAnimal() {}
let missPrincess = new Cat();
console.log(missPrincess instanceof FeralAnimal); // ???