reactplay / docs

Documentation for ReactPlay.
https://docs.reactplay.io/
MIT License
27 stars 13 forks source link

doc: Custom hooks created as ReactPlay APIs #34

Closed supminn closed 1 year ago

supminn commented 1 year ago

Hi @atapas @Sachin-chaurasiya I have created an initial version of this documentation. Please review and share your feedback.

netlify[bot] commented 1 year ago

Deploy Preview for react-play-docs ready!

Name Link
Latest commit 0d82c008c87ea88da83eb9e49fa656fbf5541e56
Latest deploy log https://app.netlify.com/sites/react-play-docs/deploys/6424322e4378d40007c18b71
Deploy Preview https://deploy-preview-34--react-play-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Sachin-chaurasiya commented 1 year ago

Thanks for the PR @supminn , we will review it.

Sachin-chaurasiya commented 1 year ago

Hello @atapas @supminn, One structure I can think of is,

supminn commented 1 year ago

Hello @atapas @supminn, One structure I can think of is,

  • What this hook does?
  • What parameters it accepts

    • param1 : param1 is for x thing
    • param2: param2 is for y thing
  • What it will return

    • data: data is a list of x thing
    • isLoading: is the loading status
    • error: error if there is any
  • Example

I liked this approach, however, not all the hooks accept parameters. In this case, should I mention the bullet point or ignore them altogether?

Sachin-chaurasiya commented 1 year ago

Hello @atapas @supminn, One structure I can think of is,

  • What this hook does?
  • What parameters it accepts

    • param1 : param1 is for x thing
    • param2: param2 is for y thing
  • What it will return

    • data: data is a list of x thing
    • isLoading: is the loading status
    • error: error if there is any
  • Example

I liked this approach, however, not all the hooks accept parameters. In this case, should I mention the bullet point or ignore them altogether?

You can ignore it.

atapas commented 1 year ago

Looks neat.