import React from "react";
import Hill from "./Hill";
import Animal from "./Animal";
const fav = "hill";
this is not working;
// const App = () => {
// <>
// <h1> my fav card</h1>;
// {fav === "hill" ? <Hill/> : <Animal/>}
// </>
// }
this code is working when i am using parentheses insted of curly braces...why???
const App = () => (
<>
<h1> my fav card</h1>;
{fav === "hill" ? <Hill /> : <Animal />}
</>
);
export default App;