> For the complete documentation index, see [llms.txt](https://manu-artero-anguita.gitbook.io/buenas-practicas-con-react/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manu-artero-anguita.gitbook.io/buenas-practicas-con-react/sesion-5/12.-documentacion.md).

# 12. Documentación

### Comentarios de calidad

* `README.md`
* (exp personal): mantenerse lejos del detalle

{% embed url="<https://project-awesome.org/matiassingers/awesome-readme>" %}

#### TODOs y FIXMEs

* TODO: algo que dejas incompleto a sabiendas
* FIXME: algo que puede causar una issue/bug
* (exp. personal): Poner el ID de la herramienta de ticketing
* (exp. personal): Dejar enlaces de la investigación que has hecho, en el futuro sabrás por donde tirar.

```javascript
// TODO LAM-2950
// Fix deprecated warning (error for storybook >= v7)
// @see https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators
addDecorator(literalsDecorator);
```

```javascript
// FIXME LAM-3258
// <ScreenList /> depends on <ScreenCardController /> */
function ScreenList(props) {
```

### Comentarios de mala calidad

```javascript
/**
 * @param {itemId} itemId
 */
function getItemPrice(itemId) {}
```

```javascript
/**
 * fetch item name
 */
function getItemPrice(itemId) {}
```

#### Ejercicio: cómo comentarias esta función?

```javascript
function getFileInfoFromFolder(path) => {
  const files = fs.readdirSync(path, 'utf8');
  const response = [];
  for (let file of files) {
    const extension = path.extname(file);
    const fileSizeInBytes = fs.statSync(file).size;
    response.push({ name: file, extension, fileSizeInBytes });
  }
  return response;
}
```

### Documentación front: `storybook`

{% embed url="<https://storybook.js.org/>" %}

{% embed url="<https://storybook.js.org/addons/@storybook/addon-storyshots>" %}

{% file src="/files/MESM71RV77C16XnLHzgm" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manu-artero-anguita.gitbook.io/buenas-practicas-con-react/sesion-5/12.-documentacion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
