as you may get from the title, passing props in react is not working. And i don´t get why.
Main Ap Component
import './App.css';
import Licence from './Licence';
function App() {
return (
<>
<Licence>
test={"Test123"}
</Licence>
</>
);
}
export default App;
Other Component
import React from 'react';
const Licence = (props) => {
return (
<div>
<h1>name : {props.test}</h1>
</div>
)
}
export default Licence;
Problem if i start the script and render the page, nothing is shown. What am I doing wrong?
test={"Test123"}
you are trying to pass an object. Please replace it withtest="Test123"
. It should resolve your issue. – Dhruvi Makvana