Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add useGetTree doc #8065

Merged
merged 2 commits into from
Aug 11, 2022
Merged

[Doc] Add useGetTree doc #8065

merged 2 commits into from
Aug 11, 2022

Conversation

thibault-barrat
Copy link
Contributor

image

@thibault-barrat thibault-barrat added the RFR Ready For Review label Aug 11, 2022
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise everything seems good to me 🙂

Comment on lines 24 to 32
```jsx
import { useGetTree } from '@react-admin/ra-tree';
const Categories = () => {
const { data, isLoading, error } = useGetTree('categories');
if (isLoading) { return <Loading />; }
if (error) { return <p>ERROR</p>; }
return <Tree tree={data} />;
};
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should complete this code example with exhaustive imports.
At least to show that the Tree component is also provided by ra-tree.

Copy link
Member

@fzaninotto fzaninotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants