Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
data-consumer-stream-context-blog
import React from "react";
import { View, Text } from "react-native";
import { BranchConsumer } from "./BranchContext";
let DataConsumer = ({ deeplinkContent }) => {
/*
at this point, all key/value pairs embedded in the deeplink
may be pulled off the `deeplinkContent` object for in-app use
*/
return (
<View>
<Text>Access Deeplink Content in this Component!</Text>
</View>
);
};
DataConsumer = props => (
// pass deeplink data saved on App load into DataConsumer as props
<BranchConsumer>
{({ contextData }) => (
<DataConsumer {...props} deeplinkContent={contextData} />
)}
</BranchConsumer>
);
export default DataConsumer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.