The react function defines how components are created and referenced.

for a project built with create-react-app , I want to create a function definition component and then reference it to App.js , but keep reporting an error: React" must be in scope when using JSX . The official website documentation really doesn"t understand how to create and reference

.
function Logo(){
  return <div>logo</div>
}

under import React from 'react' at the beginning of the file, although you don't use React

Menu