Integration
Remix
Run bknd inside Remix
Installation
Install bknd as a dependency:
Serve the API
Create a new api splat route file at app/routes/api.$.ts
:
For more information about the connection object, refer to the Setup guide.
Now make sure that you wrap your root layout with the ClientProvider
so that all components
share the same context:
Enabling the Admin UI
Create a new splat route file at app/routes/admin.$.tsx
:
Example usage of the API
Since the API has already been constructed in the root layout, you can now use it in any page: