Skip to content

Instantly share code, notes, and snippets.

@giioohbernini
Last active July 28, 2020 17:05
Show Gist options
  • Save giioohbernini/38d1c04048798b12c9af9b23a8c923c6 to your computer and use it in GitHub Desktop.
Save giioohbernini/38d1c04048798b12c9af9b23a8c923c6 to your computer and use it in GitHub Desktop.
Web to native #7
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