Last active
May 12, 2020 11:39
-
-
Save pavinduLakshan/1664492b4c3fcd85b7785a4d3b7a77b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react' | |
const Component1 = props => { | |
return <p>{props.theme}</p> | |
} | |
const Component2 = props => { | |
return <Component1 theme={props.theme}/> | |
} | |
const Component3 = () => { | |
const [theme,setTheme] = useState("default") | |
return ( | |
<div> | |
<Component2 theme={theme}/> | |
</div> | |
) | |
} | |
export default Component3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment