Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda authored Jun 20, 2023
1 parent 191e58a commit c7d26be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Base64-packed javascript (default-)module exports that can be npm installed and

# Usage

### React-three-fiber
## React-three-fiber

In React you can use `suspend` from [suspend-react](https://github.com/pmndrs/suspend-react), or anything else that can resolve a promise. This will allow components to fall into suspense which allows you to control loading states. The assets will be lazy loaded and cached for multiple re-use, they will not appear in the main bundle.
In React you can use `suspend` from [suspend-react](https://github.com/pmndrs/suspend-react), or anything else that can resolve a promise. The assets will be lazy loaded and cached for multiple re-use, they will not appear in the main bundle.

```jsx
import { Environment, Gltf, Text, Text3D } from '@react-three/drei'
Expand All @@ -48,6 +48,8 @@ function Scene() {
<Text3D font={suspend(interBold).default}>hello</Text3D>
```
## Vanilla javascript
### Dynamic import
> **Note**
Expand Down

0 comments on commit c7d26be

Please sign in to comment.