Skip to content

Commit

Permalink
[Content]: Typo in fetching-data guide
Browse files Browse the repository at this point in the history
As per #689 , fixing the typo present with `onCleanup`
  • Loading branch information
LadyBluenotes authored and atilafassina committed May 13, 2024
1 parent cb2e2f3 commit a25c2a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/guides/fetching-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ When real-time feedback is necessary, the `refetch` method can be used to reload
This method can be particularly useful when data is constantly evolving, such as with real-time financial applications.

```jsx
import { createResource, onCleanUp } from 'solid-js';
import { createResource, onCleanup } from 'solid-js';

function StockPriceTicker() {
const [prices, { refetch }] = createResource(fetchStockPrices);

const timer = setInterval(() => {
refetch()
}, 1000);
onCleanUp(() => clearInterval(timer))
onCleanup(() => clearInterval(timer))
}
```

0 comments on commit a25c2a2

Please sign in to comment.