I am learning through the React functional components and using TypeDoc to generate some documentation (maybe I shouldn't be using that). Anyway I want to somehow get a list of states (or even states used) in the documentation that is generates without repeating myself in the top part of the function.
I don't think it is possible from looking at the code I have written since it's basically inner comments rather than something exposed.
/**
* I don't want to document whatever states here...
*/
const AuthProvider = ({ children }: { children: React.ReactChild }) => {
/**
* OAuth token.
*/
const [authToken, setAuthToken] = useState<OAuthToken | null>(null);
/**
* This state contains the AxiosResponse for the error or null.
*/
const [authError, setAuthError] = useState<AxiosResponse | null>(null);
What I am hoping for is some sort of documentation like
AuthProvider
I don't want to document whatever states here...
State Hooks
question from:
https://stackoverflow.com/questions/65850029/how-do-you-document-react-functional-components-using-typedoc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…