React SDK
React components and hooks for embedding changelogs.
Installation
Usage
API
usePosts(options)
Hook for fetching and managing posts.
| Option | Type | Description |
|---|---|---|
client | ChangesPageClient | Client instance |
initialData | UsePostsInitialData | SSR initial data (optional) |
limit | number | Posts per page (default: 10) |
Returns:
| Property | Type | Description |
|---|---|---|
posts | Post[] | Fetched posts |
hasMore | boolean | More posts available |
loading | boolean | Loading state |
error | Error | Error if any |
loadMore | () => void | Load next page |
refetch | () => void | Refresh posts |
<ChangelogPost>
Render prop component for displaying posts.
Re-exports
The React SDK re-exports everything from @changespage/core including createChangesPageClient, getTagLabel, and all types.