Преглед изворни кода

docs: update upgrade guide for useTexture composable changes (#1074)

- Modified the usage section to reflect that the `useTexture` composable now returns a reactive state along with a loading state, enhancing clarity for users.
- Updated the import statement to align with the new structure of the TresJS core library.
Alvaro Saburido пре 1 месец
родитељ
комит
df8ccf4b7a
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      docs/content/1.getting-started/4.upgrade-guide.md

+ 3 - 3
docs/content/1.getting-started/4.upgrade-guide.md

@@ -194,10 +194,10 @@ import { useTexture } from '@tresjs/core'
 import { useTexture } from '@tresjs/cientos'
 ```
 
-3. **Usage remains the same**:
+3. **Usage updated**:
 ```js
-// ✅ Same usage pattern
-const texture = await useTexture('/textures/brick.jpg')
+// ✅ Composable now returns reactive state with loading state
+const { state: texture, isLoading } = useTexture('/textures/brick.jpg')
 ```
 
 ### Event System Changes