'react-admin edit component is not working
I have been following the tutorial on react-admin and when I get to the part where you have to edit, a user for instance, the edit page shows up black with no errors in the devtool window. Please have a look at my code. Where am I going wrong?
in App.js
<Admin dataProvider={dataProvider} authProvider={authProvider}>
<Resource name="users" list={ UserList } layout={ MyLayout } edit={UserEdit} create={UserCreate} />
</Admin>
in UserList.js
export const UserEdit = (props) => {
<Edit {...props}>
<SimpleForm>
<ReferenceInput source="id" reference="users">
<SelectInput optionText="id" />
</ReferenceInput>
<TextInput source="firstName" />
<TextInput source="lastName" />
<TextInput source="email" />
<TextInput source="organization" />
<TextInput source="status" />
</SimpleForm>
</Edit>
}
Solution 1:[1]
You have a problem here:
<Resource name="users" list={ UserList } layout={ MyLayout } edit={UserEdit} create={UserCreate} />
layout is an Admin prop, It shouldn't be in a Resource
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | WiXSL |
