From c1fa9698331758e5be985855e7652b0a7383d9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20=C4=90=C3=ACnh=20Huy?= Date: Sun, 30 Aug 2026 17:47:17 +0700 Subject: [PATCH] docs: make usage example self-contained --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2ce7287..a2126fb 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,15 @@ yarn add react-native-graph ## Usage ```tsx -import { LineGraph } from 'react-native-graph'; +import { LineGraph, type GraphPoint } from 'react-native-graph'; -function App() { - const priceHistory = usePriceHistory('ethereum'); +const priceHistory: GraphPoint[] = [ + { date: new Date('2026-08-27T00:00:00Z'), value: 3.44 }, + { date: new Date('2026-08-28T00:00:00Z'), value: 3.51 }, + { date: new Date('2026-08-29T00:00:00Z'), value: 3.49 }, +]; +function App() { return (