You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constcurrentText=12345.44constupdateText=(text)=>{// if not update state then what?}return(<Viewstyle={styles.container}><Text>{currentText}</Text><SlideAreaChartscrollablecallbackWithX={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.
The text was updated successfully, but these errors were encountered:
I'm using something based on this and it's working nicely. The key features are the Memoised chart to avoid re-rendering it when x changes, and the debouncing that only accepts updates every 100ms. Combining both it gives a nice smooth motion, even in debug mode.
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:
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.
The text was updated successfully, but these errors were encountered: