@youversion/platform-react-hooks 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
 
2
- > @youversion/platform-react-hooks@0.5.6 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/hooks
2
+ > @youversion/platform-react-hooks@0.5.8 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/hooks
3
3
  > tsc -p tsconfig.build.json
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @youversion/platform-react-hooks
2
2
 
3
+ ## 0.5.8
4
+
5
+ ### Patch Changes
6
+
7
+ - ae9c599: chore(build): move tsup to devDependency
8
+ - Updated dependencies [ae9c599]
9
+ - Updated dependencies [ae9c599]
10
+ - @youversion/platform-core@0.5.8
11
+
12
+ ## 0.5.7
13
+
14
+ ### Patch Changes
15
+
16
+ - 8b2be56: Improve sample code and readmes
17
+ - Updated dependencies [8b2be56]
18
+ - @youversion/platform-core@0.5.7
19
+
3
20
  ## 0.5.6
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -6,13 +6,13 @@ React hooks for accessing YouVersion Platform APIs with automatic loading/error
6
6
 
7
7
  ## When to use this package
8
8
 
9
- Use `@youversion/platform-react-hooks` when you need:
10
- - ✅ Building custom React components with Bible features
11
- - ✅ Declarative data fetching with automatic loading/error states
12
- - ✅ Control over component UI while using reusable hooks
13
- - ✅ Server-side rendering compatible hooks
9
+ Use `@youversion/platform-react-hooks` when you need to:
10
+ - ✅ Build custom React components with Bible features
11
+ - ✅ Fetch data declaratively with automatic loading/error states
12
+ - ✅ Keep control over component UI while leveraging reusable hooks
13
+ - ✅ Support server-side rendering compatible hooks
14
14
 
15
- **Use other packages instead if:**
15
+ **Use other packages instead if you:**
16
16
  - ❌ Need direct API access → Use [@youversion/platform-core](../core/README.md) for low-level client
17
17
  - ❌ Want ready-made UI → Use [@youversion/platform-react-ui](../ui/README.md) for production components
18
18
 
@@ -26,24 +26,13 @@ Get your App Key at [platform.youversion.com](https://platform.youversion.com/)
26
26
 
27
27
  ## Usage
28
28
 
29
- Wrap your app with `BibleSDKProvider`:
30
-
31
29
  ```tsx
32
- import { BibleSDKProvider, useVersion, usePassage } from '@youversion/platform-react-hooks';
30
+ import { BibleSDKProvider, usePassage } from '@youversion/platform-react-hooks';
33
31
 
34
32
  function BibleVerse() {
35
- const { version, loading: versionLoading } = useVersion(111);
36
- const { passage, loading: passageLoading } = usePassage(111, 'JHN.3.16');
37
-
38
- if (versionLoading || passageLoading) return <div>Loading...</div>;
39
-
40
- return (
41
- <div>
42
- <h1>{passage?.human_reference}</h1>
43
- <p>Version: {version?.abbreviation}</p>
44
- <div dangerouslySetInnerHTML={{ __html: passage?.content || '' }} />
45
- </div>
46
- );
33
+ const { passage, loading } = usePassage({ versionId: 111, usfm: 'JHN.3.16' });
34
+ if (loading) return <div>Loading...</div>;
35
+ return <div dangerouslySetInnerHTML={{ __html: passage?.content || '' }} />;
47
36
  }
48
37
 
49
38
  function App() {
@@ -55,6 +44,12 @@ function App() {
55
44
  }
56
45
  ```
57
46
 
58
- ---
47
+ ## Documentation and API Reference
48
+ * [developers.youversion.com/sdks/react](https://developers.youversion.com/sdks/react)
49
+
50
+ ## License
51
+
52
+ This SDK is licensed under [Apache 2.0](./LICENSE).
59
53
 
60
- **API Reference:** [developers.youversion.com/sdks/react](https://developers.youversion.com/sdks/react)
54
+ Licensing information for the Bible versions is available
55
+ at the [YouVersion Platform](https://platform.youversion.com/) site.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-react-hooks",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  "dependencies": {
25
- "@youversion/platform-core": "0.5.6"
25
+ "@youversion/platform-core": "0.5.8"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=19.1.0 <20.0.0"
@@ -36,8 +36,8 @@
36
36
  "eslint": "9.38.0",
37
37
  "typescript": "5.9.3",
38
38
  "vitest": "4.0.4",
39
- "@internal/tsconfig": "0.0.0",
40
- "@internal/eslint-config": "0.0.0"
39
+ "@internal/eslint-config": "0.0.0",
40
+ "@internal/tsconfig": "0.0.0"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "tsc --watch",