Refine: build the admin interface you actually want

Build React dashboards and admin interfaces with Refine’s resource hooks and data providers. Keep your own visual design while reusing the data and mutation lifecycle.

What it is

The tenth dashboard you build will probably need much the same machinery as the first. Fetch some records, display them, let someone change one and refresh the screen when the update succeeds.

Refine is a React framework that handles much of that work through resource hooks. A data provider connects those hooks to your API; additional providers handle authentication and access checks.

You can choose a ready-made UI integration or use your own components. This is particularly appealing if the administration interface is part of your actual product, rather than an afterthought.

Example administration dashboard built with Refine and Material UI.
An administration dashboard built with Refine and Material UI. Source: Refine.

What’s new

The Refine core changelog records a useful addition in 5.1.0: applications can update a signed-in user’s identity through the authentication provider, including changes such as a name or email address.

Version 5.2.0 improves TypeScript support for custom data providers and application-specific query metadata. That gives developers better checks and editor suggestions when extending the framework without changing runtime behaviour. Our working prototype used 5.0.12; the 5.2.0 source was reviewed separately. Check package compatibility before upgrading.

What else is similar to it

React-admin provides a mature resource-oriented framework with an established admin interface. It is a natural comparison when the interface is mainly CRUD.

TanStack Query gives you the lower-level fetching and cache lifecycle. You supply more of the resource conventions yourself.

Why it’s different

Refine’s MIT core offers a useful middle ground for teams that want their own interface but would rather inherit the repetitive data lifecycle.

In our synthetic approval-queue prototype, Refine handled loading records, updating a decision and invalidating the affected list. We kept the product’s layout and stale-update recovery in our own code. The workflow and its server-side authorisation remain application responsibilities.

How to get started

  1. Have a React project or use the quickstart to scaffold one.
  2. Choose a small resource and its API; a mock endpoint is fine for the first experiment.
  1. Bootstrap a project with create-refine-app and choose a data provider and UI approach.
  2. Configure a resource and use useList to display its records.
  3. Add an edit or approval action with useUpdate, then inspect how the list refreshes.
  1. Check loading, error and empty states; simulate a failed or stale update.
  2. Keep real permission checks in the API. Client access checks are for interface behaviour.

Explore further: Documentation · Releases · GitHub.

Share your thoughts…?

    Get Geekist in your inbox

      Choose your newsletters. Confirm your email to subscribe.

      Choose your newsletters

      Read the privacy policy