
npm install @youversion/platform-react-hooksReact hooks for accessing YouVersion Platform APIs with automatic loading/error states.
Use @youversion/platform-react-hooks when you need to:
- ✅ Build custom React components with Bible features
- ✅ Fetch data declaratively with automatic loading/error states
- ✅ Keep control over component UI while leveraging reusable hooks
- ✅ Support server-side rendering compatible hooks
Use other packages instead if you:
- ❌ Need direct API access → Use @youversion/platform-core for low-level client
- ❌ Want ready-made UI → Use @youversion/platform-react-ui for production components
``bash`
pnpm add @youversion/platform-react-hooks
Get your App Key at platform.youversion.com
`tsx
import { YouVersionProvider, usePassage } from '@youversion/platform-react-hooks';
function BibleVerse() {
const { passage, loading } = usePassage({ versionId: 111, usfm: 'JHN.3.16' });
if (loading) return
function App() {
return (
);
}
``
This SDK is licensed under Apache 2.0.
Licensing information for the Bible versions is available
at the YouVersion Platform site.