-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Good day.
Really enjoying your library so far but I am struggling to understand how to make use of callbackWithX.
I need to update another elements content with the value returned from this function.
Example:
const currentText = 12345.44
const updateText = (text) => {
// if not update state then what?
}
return (
<View style={styles.container}>
<Text>{currentText}</Text>
<SlideAreaChart
scrollable
callbackWithX={updateText}
animated={false}
alwaysShowIndicator={false}
style={{ marginTop: 32 }}
shouldCancelWhenOutside={false}
data={data}
axisWidth={0}
axisHeight={0}
paddingBottom={8}
toolTipProps={{
}}
/>
</View>
);In the example above, my goal is to update currentText so I can have this displayed in the <Text /> component.
If I should not be making use of state to achieve this, what should I be using instead?
I'm just struggling to find a pattern that works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels