The installer writes resources/js/components/CommentThread.tsx, publishes the SDK, and wires package.json. Finish with React, the Vite plugin, and the JavaScript Vite notes (exclude + @viteReactRefresh).
Scaffolded wrapper
Keeping the markup in the package is what lets Blade and JS stay in step.
Props
type and id also exist on CommentifyClient methods as the first arguments to listComments / createComment.
Mount in a Blade view
Pass the thread identity through data attributes so the same bundle works on every page:
articles is the alias from commentables.
Mount in an Inertia page
It is an ordinary component:
Share one client
Wrap the app in CommentifyProvider once (for example in Inertia app.tsx):
<CommentThread /> and useCommentThread() pick it up. Passing baseUrl, prefix, or token on a thread overrides the provider for that thread only.
Headless
When you want the data and none of the markup, use the hook and headless API. Last modified on September 12, 2026