Last active
July 28, 2020 17:05
-
-
Save giioohbernini/38d1c04048798b12c9af9b23a8c923c6 to your computer and use it in GitHub Desktop.
Web to native #7
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 messageEvents from '~/utils/messageEvents' | |
//... | |
const handleOnMessage = event => { | |
const value = event.nativeEvent.data | |
const parsedValue = JSON.parse(value) | |
messageEvents({ ...parsedValue, setCurrentUrl, setCanGoBack, ...props }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment