Skip to content

Instantly share code, notes, and snippets.

@kylephughes
Created July 27, 2021 13:29
Show Gist options
  • Save kylephughes/835c2790fdd4e03b5374b1c748b4041e to your computer and use it in GitHub Desktop.
Save kylephughes/835c2790fdd4e03b5374b1c748b4041e to your computer and use it in GitHub Desktop.
export const App = () => {
const [notification, setNotification] = useState('') // where should this state live?
return (
<Hierarchy1>
<Component1>
<Notification/> // renders a notification
</Component1>
</Hierarchy1>
<Hierarchy2>
<Component2>
<FormComponent/> // needs to set the notification
</Component2>
</Hierarchy2>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment