Skip to content

Commit 8f9b8a9

Browse files
ci(changesets): version packages (#57)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0a684bf commit 8f9b8a9

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

.changeset/safe-backend-hooks.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/rdk/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# @omnidotdev/rdk
22

3+
## 0.7.0
4+
5+
### Minor Changes
6+
7+
- [#56](https://github.com/omnidotdev/rdk/pull/56) [`39954c3`](https://github.com/omnidotdev/rdk/commit/39954c39ad6e35a389ba06a16915d4ec186dead2) Thanks [@coopbri](https://github.com/coopbri)! - Add status flags to backend hooks for safe destructuring.
8+
9+
`useGeolocationBackend()` and `useFiducialBackend()` now return an object with `isPending` and `isSuccess` boolean flags instead of returning `null` on first render. This enables safe destructuring without null checks:
10+
11+
```tsx
12+
// before (crashed on first render)
13+
const geo = useGeolocationBackend();
14+
const locar = geo?.locar;
15+
16+
// after (safe destructuring)
17+
const { locar, isPending, isSuccess } = useGeolocationBackend();
18+
19+
if (isSuccess && locar) {
20+
const worldCoords = locar.lonLatToWorldCoords(lon, lat);
21+
}
22+
```
23+
24+
New exported types: `GeolocationBackendState`, `FiducialBackendState`
25+
326
## 0.6.0
427

528
### Minor Changes

packages/rdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@omnidotdev/rdk",
33
"description": "AR.js with react-three-fiber",
4-
"version": "0.6.0",
4+
"version": "0.7.0",
55
"license": "MIT",
66
"type": "module",
77
"main": "build/index.js",

0 commit comments

Comments
 (0)