Answer the question
In order to leave comments, you need to log in
How to call a component in a stateless function?
function App() {
<Component></Component>
}
// Component.js
function Component(props) {
return (<h1>{props.name}</h1>)
}
// Main.js
function Main() {
const add = () => {
// Здесь нужно вызвать Component
return (<Component name="Имя"></Component>)
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question