Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compatibility with react-admin base components

Open
#490 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
react, typescript
Domain
api, frontend

Research direction

Start with pwa/admin/index.tsx and reproduce the reported combinations of HydraAdmin, ResourceGuesser, ListGuesser, TextField, List, and Datagrid. Read the HydraAdmin integration and the react-admin router and theme setup implicated by the errors. Done means regular react-admin components, routing, theming, and the documented JWT login flow work without the reported errors.

Written by the indexing model from the issue text.

Description

API Platform version(s) affected: 3.4.3 (api platform admin version)

Description
I am having multiple issues when trying to use regular react-admin components.
For example trying to use a 'TextField' in ListGuesser doesn't display anything.
Worse, if i try to replace the ListGuesser with a regular List + Datagrid, I am getting error about useNavigate() needing a Router. If i encapsulate HydraAdmin with BrowserRouter, i am getting a 'theme' is null error instead... and on and on... I am just wondering if this is something i am doing wrong, or if it's just not ready at the moment ?
I managed to get to login with jwt, but ran into numerous issues too despite using the code in the documentation. Basically, can't replace the login page either, running also in the router + theme issues...

How to reproduce
only modification from the base project, in the pwa/admin/index.tsx page

import Head from "next/head";
import { useEffect, useState } from "react";
import {FieldGuesser, ListGuesser, ResourceGuesser} from "@api-platform/admin";
import {TextField} from "react-admin";

const GreetingList = props => (
  <ListGuesser {...props}>
    <FieldGuesser source={"name"} />
    <TextField source={"name"} />
  </ListGuesser>
);

const Admin = () => {
  // Load the admin client-side
  const [DynamicAdmin, setDynamicAdmin] = useState(<p>Loading...</p>);
  useEffect(() => {
    (async () => {
      const HydraAdmin = (await import("@api-platform/admin")).HydraAdmin;

      setDynamicAdmin(<HydraAdmin entrypoint={window.origin}>
        <ResourceGuesser name={"greetings"} list={GreetingList} />
      </HydraAdmin>);
    })();
  }, []);

  return (
    <>
      <Head>
        <title>API Platform Admin</title>
      </Head>

      {DynamicAdmin}
    </>
  );
};
export default Admin;

Possible Solution

Additional Context

Dominant language
TypeScript
Stars
516
Forks
134
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from api-platform/admin

All issues in api-platform/admin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.