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

Reformat "Hooks" section of docs #3486

Open
2 of 9 tasks
loenard97 opened this issue Oct 26, 2023 · 1 comment
Open
2 of 9 tasks

Reformat "Hooks" section of docs #3486

loenard97 opened this issue Oct 26, 2023 · 1 comment

Comments

@loenard97
Copy link

This is about:

  • A typo
  • Innaccurate/misleading documentation (e.g. technically incorrect advice)
  • Undocumented code
  • Outdated documentation
  • Improvement to existing documentation
  • Other

Problem
The State page and the Hooks page of the docs talk about the same concepts.

  • Hooks explains how to use hooks to store state
  • State explains which hook to use for which type of state

I would suggest combining these two pages into one, because of their similarity. The table in 'State' could be combined together with the list of 'Hooks/Pre-defined Hooks'. The headline of the page could then be something like "Storing state with Hooks".

Additionally the "Custom Hooks" page is a single subsection, which is considered bad writing style: Stackexchange discussion. Either a section has not enough content to be split into subsections, or it has enough content to be split into multiple subsections. The Hooks section has enough content to divide it into two subsections, so I would suggest a structure like this:

  • Storing state with Hooks (contains: short introduction on the concept of hooks and links to further reading material)
    • Predefined Hooks (contains: rules on hooks and the table from "State" listing all predefined hooks)
    • Custom Hooks (contains: how to write custom hooks)

Questionaire (Optional)

  • I'd like to write this documentation
  • I'd like to write this documentation but I'm not sure what's needed
  • I don't have time to add this right now, but maybe later
@hamza1311
Copy link
Member

I would like to have a section about state somewhere other than hooks as well. Perhaps it can be in the components intro page? We can also move the table to docs.rs since that's where all the docs about predefined hooks are. Custom hooks and hooks page should be combined, I agree.

Would you like to PR?

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

Successfully merging a pull request may close this issue.

2 participants