Skip to content

Commit 6b37985

Browse files
authored
[Docs]: Render toast on page load (#363)
* [Docs]: Add render toast on page load * fix typo
1 parent c7740f7 commit 6b37985

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

website/src/pages/toast.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ toast('My toast', {
2727
});
2828
```
2929

30+
### Render toast on page load
31+
32+
To render a toast on initial page load it is required that the function `toast()` is called inside of a `setTimeout` or `requestAnimationFrame`.
33+
34+
```jsx
35+
setTimeout(() => {
36+
toast('My toast on a page load');
37+
})
38+
```
39+
3040
## Creating toasts
3141

3242
### Success

0 commit comments

Comments
 (0)