Comments (3)
Hooks
/**
* Brief description of the hook.
*
* A more detailed description of the hook, if necessary. Can include
* information about when to use the hook, how it works internally,
* or potential edge cases.
*
* @param {Type} name - Description of the parameter. Be specific about
* the expected type and any constraints. If a parameter is optional,
* indicate it using `?` after the parameter name.
* @returns {Type} Description of the return value. Be specific about
* the type and structure of the returned value.
*
* @example
* // Example usage of the hook with explanation
* const exampleExample = useHook(parameters);
*/
export const useHook = (parameter: Type): ReturnType => {
// ... implementation
};
Utilities
/**
* Brief description of the utility function.
*
* A more detailed description of the utility function, if necessary.
* Can include information about when to use the function, how it works
* internally, or potential edge cases.
*
* @param {Type1} parameter1 - Description of the first parameter.
* @param {Type2} [parameter2] - Description of the second optional parameter.
* @returns {ReturnType} Description of the return value.
*
* @example
* // Example usage of the utility function
* const result = utilityFunction(parameter1, parameter2);
*/
export const utilityFunction = (parameter1: Type1, parameter2?: Type2): ReturnType => {
// ... implementation
};
Types
/**
* Type description. Provide a clear and concise explanation of what
* the type represents and how it should be used.
*
* @typedef {Object} TypeName
* @property {Type} propertyName - Property description. Be specific
* about the expected type and any constraints. Indicate optional
* properties using `?` after the property name.
*/
export type TypeName = {
propertyName: Type;
};
Enums
/**
* Enum description. Explain the purpose of the enum and the meaning
* of each value.
*
* @enum {string} EnumName
*/
export enum EnumName {
/** Description of value 1. */
VALUE1 = 'value1',
/** Description of value 2. */
VALUE2 = 'value2',
}
Interfaces
/**
* Interface description. Provide a clear and concise explanation of
* what the interface represents and how it should be used.
*
* @interface InterfaceName
*/
export interface InterfaceName {
/** Description of property 1. */
property1: Type;
/** Description of property 2. (Optional) */
property2?: Type;
}
Constants
/**
* Constant description. Explain the purpose and usage of the constant.
*
* @type {Type}
*/
export const CONSTANT_NAME: Type = value;
from reactuse.
Updated the documentation pattern for hooks
UPD: Updated the documentation pattern for types? enums, interfaces, constants.
UPD: Added Utilities documentation pattern.
from reactuse.
I think I've covered most of the cases in this issues and there will be no problems with it in the future. There is no need for this issue anymore.
from reactuse.
Related Issues (20)
- [test]: describe tests for useArrayEvery HOT 1
- [test]: describe tests for useArrayFilter HOT 1
- [test]: describe tests for useArrayFind HOT 1
- [test]: describe tests for useArrayFindIndex HOT 1
- [test]: describe tests for useArrayFindLast HOT 1
- [test]: describe tests for useArrayIncludes HOT 1
- [test]: describe tests for useArrayJoin HOT 1
- [test]: describe tests for useArrayMap HOT 1
- [test]: describe tests for useArrayReduce HOT 1
- [test]: describe tests for useArraySome HOT 1
- [test]: describe tests for useArrayUnique HOT 1
- [test]: describe tests for useList HOT 1
- [chore]: add demo for useList HOT 1
- [chore]: add demo for useSorted HOT 1
- [test]: describe useScript HOT 1
- [chore]: organize useScript HOT 1
- [test]: describe useWindowLoad HOT 1
- [demo]: add demo for useWindowLoad HOT 1
- [chore]: organize useWindowLoad HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactuse.