React Admin v3: Improved Developer Experience Thanks to React Hooks

François Zaninotto
François ZaninottoNovember 20, 2019
#react#react-admin

I have the immense pleasure to announce the release of a new major version of react-admin, the frontend framework for building B2B applications on top of REST/GraphQL APIs, using ES6, React and Material Design. React-admin version 3 is out today. Tadaa!

This release is the outcome of 7 months of hard work. The result is an improved developer experience, as we embraced modern React practices - including Hooks:

import { useQuery } from 'react-admin';

const UserProfile = ({ userId }) => {
  const { data, loading, error } = useQuery({
    type: "getOne",
    resource: "users",
    payload: { id: userId },
  });

  if (loading) return <Loading />;
  if (error) return <Error />;
  if (!data) return null;

  return (
    <ul>
      <li>Name: {data.name}</li>
      <li>Email: {data.email}</li>
    </ul>
  );
};

But there is much, much more in this release than what an announcement blog post can suggest. I've already published a few other posts in the past, highlighting the major changes in this version:

If you want to see the detail of the 286 pull requests that lead us from 2.x to 3.x, check out the 3.0.0 milestone on GitHub.

And if you want to upgrade a react-admin 2.x application to 3.0, we've prepared an upgrade guide for you.

I would like to thank all the people who made this release possible, by contributing design, code, documentation, and tests, by testing intermediate releases and reporting bugs, by voicing their opinion, and finally, by being ultra supportive of the work-in-progress. Special thanks go to Gildas and Thiery from marmelab, who were the earliest and most prolific contributors to this release. But this is really a team work by as many as 23 contributors!

Today, I feel like taking some time off to enjoy the release - because the past 7 months have been exhausting! Let's say I won't commit on react-admin for the next... day or so. In the meantime, I'll celebrate both this new release, and the 10,000 stars that GitHub users across the world have granted us. Feel free to make a toast to react-admin v3 together with us, to spread the good news, and of course, to jump right in and start using version 3 today!

Did you like this article? Share it!