Skip to content

UrsDeSwardt/watermelondb-nextjs-example

Repository files navigation

WatermelonDB with Next.js

This is an example of how to use WatermelonDB with Next.js. An optional backend for this example can be found here. Some non-obvious things are done in this example that is not explained in the docs:

  • We have to implement a custom DatabaseProvider. The provider is defined in db-provider.tsx and used in the root layout.tsx.
  • We have make use of hooks to access the database, otherwise the observability does not work.

Running the example

Install the dependencies and start the development server:

npm install
npm run dev

Navigate to http://localhost:3000 to see the example in action.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published