Giter VIP home page Giter VIP logo

Comments (9)

swyxio avatar swyxio commented on April 19, 2024 1

yeah so a docusaurus + algolia setup maybe in order. well if you’d like to try an mvp i’d be happy to deploy and point people to it!

from react.

swyxio avatar swyxio commented on April 19, 2024 1

docusaurus maintainers are pretty responsive, just reach out im sure your usecase isnt new!

even tho i help maintain docz, its kinda dead right now. would recommend docusaurus.

from react.

hedgerh avatar hedgerh commented on April 19, 2024

Yooo I just came across this. Let's do itttt. I could start spinning it up?

from react.

swyxio avatar swyxio commented on April 19, 2024

this hasn't been as high of a priority since i split the single cheatsheet out to multiple. so far i've had no complaints. do you think its a priority? i personally no longer do

from react.

hedgerh avatar hedgerh commented on April 19, 2024

I think the big benefit would be improved navigation. I usually ctrl+f to find things, but when I’m looking for “refs”, for instance, I’ll have to skip through a few different results to find what I need. Having a table of contents would help with discovering things you didn’t even know you wanted to know, as well.

I actually missed that there was an Advanced section until the other day. I also think I’ve had a time or two where the syntax or tip I was looking for was hidden in one of the accordions.

I think you could even just keep it as two big documents in docusaurus, but have the sidebar. I’m not sure about splitting it into a bunch of documents, necessarily. Maybe it’d be a good idea, but I’d want to request feedback from people who use it to make sure we weren’t making a worse experience by changing things.

from react.

hedgerh avatar hedgerh commented on April 19, 2024

Wanted to get your thoughts on organizing the docs.

There's a lot of great information in here that gets lost in the mix because it's intermingled with the material on typing the React API/common patterns. How do you feel about isolating the React API material into a "How To Type" section?

Unfinished draft so far:

Setup:
  Prerequisites
  React + TypeScript Starter Kits
  Import React

How To Type:
  Props
    Basic Prop Types Examples
    Useful React Prop Type Examples
    Tip: Comments on Props
  Function Components
  Class Components
  Hooks
    useState
    ...
  Default Props
  Events & Forms
  Refs (createRef/forwardRef)
  Context
  Portals
  Error Boundaries
  Concurrent React/React Suspense
  Reusable Components
    Higher Order Components
    Render Props
    `as` props

FAQ:
  Types or interfaces?

Helpful Tools & Utilities:
  Utility Types
  Type Zoo

Recipes/Patterns:
  Props: One or the other but not both
  Props: Must Pass Both
  Props: Can Optionally Pass One Only If the Other Is Passed
  Omit Attribute from a type
  Type Zoo
  Extracting prop types of a component
  Handling Exceptions
  Creating React + TypeScript Libraries
  Third Party Libraries
    Dealing with broken @types packages

It'd be cool to be able to surface all of the non-API stuff people should know in an easily discoverable way. For example, I didn't realize there was a way to import React normally with TS, since I use this as a reference, and never read the Setup section!

from react.

swyxio avatar swyxio commented on April 19, 2024

hmm! sure. this can be useful as a broader re-examination of the structure we have right now. it wasnt quite a conscious design, it just kinda grew.

from react.

hedgerh avatar hedgerh commented on April 19, 2024

not really liking working with docusaurus, and having trouble getting it to do what I want. Trying to get one that’ll show the main sections and subsection headings in the left sidebar, but coming up empty.

Docz is super easy to work with, but those sub-sections aren’t shown in the sidebar unless you’re on the page for that section

from react.

swyxio avatar swyxio commented on April 19, 2024

done thanks to @slorber :) #233

from react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.