[New Feature Template]- Feature Name

This is a template to create the documentation of a new feature or module.

Describe the module and its functionality

Recommendations

  • Be as explicit as possible.

  • Add flowcharts if necessary

  • Use Code Blocks with the correct syntax for code examples

If necessary, divide the feature in subpages for the following sections or the sections you may think are required:

  • UI Components

  • Hooks

  • Endpoints used

  • States and Selectors

Code Examples

Guidelines for writing code examples
  • Design code for reuse. Help developers determine what to modify. Add comments to explain details, but don't overdo it. Don't state the obvious.

  • Show expected output, either in a separate section after the code example or by using code comments within the code example.

  • Consider accessibility requirements for code that creates UI. For example, include alternate text for images.

  • Write secure code. For example, always validate user input, never hard-code passwords in code, and use code-analysis tools to detect security issues.

  • Show exception handling only when it's intrinsic to the example. Don't catch exceptions thrown when invalid arguments are passed to parameters.

  • Always compile and test your code.

Source: https://learn.microsoft.com/en-us/style-guide/developer-content/code-examples

Example:

const time = () => {
    if (seconds < TIMES.minSeconds) {
      return `0${seconds}`;
    }
    return seconds;
  };
  // this function returns the time in seconds

Make sure you use the correct syntax for the code example.

If you want to point out really important information, use a Hint to do it, which can change color according to the type of information you need to communicate (info, warning, danger, success).

When referring to a file, folder, function or component in the project, use code formatting when writing it, for example:

Use the initiateTransferInternal function, and invoke TransferService from /services/TransferService for internal accounts.

Do not use colors for the file, folder or function name.

Last updated