Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
export type KeyedStatisticRenderer = { key: string, render: StatisticRenderer }
export function keyedRenderer(key: string, renderer: StatisticRenderer): KeyedStatisticRenderer { return { key, render: renderer } }
const WatchlistStatisticRenderers = {
[WatchlistColumn.EstimatedEarnings]: keyedRenderer('watchlist-estimated-earnings', createStatisticFieldRenderer(() => 0))
[WatchlistColumn.Range]: keyedRenderer('watchlist-range', RangeFieldRenderer)
<AnimatedSyncedHorizontalScrollView offsetObserver={this.props.offsetObserver} style={} onPress={this.props.onPress}>
{, index) => (
style={[{ width: this.columnWidth }, Styles.container]}
{renderer.render({ quote: this.props.quote, positionStatistic: this.props.positionStatistic })}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment