Created
June 3, 2022 08:27
-
-
Save oney/3558a032c4fab7ab4c1c2e65d0ad8363 to your computer and use it in GitHub Desktop.
This file contains 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
const SendButton = withStable(["onClick"], ({ onClick }) => ( | |
<button onClick={onClick}>click</button> | |
)); | |
function ChatA({text}) { | |
const onClick = () => sendMessage(text); | |
// 😃 No need to do anything else | |
return <SendButton onClick={onClick} />; | |
} | |
function ChatB({text}) { | |
const onClick = () => sendMessage(text); | |
// 😃 No need to do anything else | |
return <SendButton onClick={onClick} />; | |
} | |
function ChatC({text}) { | |
const onClick = () => sendMessage(text); | |
// 😃 No need to do anything else | |
return <SendButton onClick={onClick} />; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment