export default Header = ({ setProp }) => {
return (
<button onClick={() => setProp('hello')}>Ok</button>
)
}
export default Main = ({ prop }) => {
return (
<div>{prop}</div>
)
}
export default App = () => {
const [mainProp, setMainProp] = useState('');
return (
<>
<Header setProp={setMainProp} />
<Main prop={mainProp}/>
</>
)
}
const useTag = '<use xlink:href="/icon/icons-sprite.svg#burgers" />';
return (
<svg dangerouslySetInnerHTML={{__html: useTag }} />
);