如何正确记录 React/Redux 应用程序? [英] How to properly document a React/Redux application?

查看:38
本文介绍了如何正确记录 React/Redux 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在记录一个用 ES6 编写的 React/Redux 应用程序,但我找不到任何有用的信息来记录 React 应用程序的最正确方式是什么.

I'm currently documenting a React/Redux application written in ES6 and I cannot find any useful information what's the most properly way to document a React application.

在这篇帖子中,工具react-docgen 出现了,我偶然发现了 esdoc 也是如此.esdoc 自动生成文档,而 react-docgen 提取 React 组件的信息并将其放入 JSON 文件中.

In this post, the tool react-docgen is presented, and I have stumble upon esdoc as well. Whereas esdoc does automatic generation of documentation, react-docgen extracts the information of the React components and puts it into a JSON file.

由于我的应用程序不仅是 React,而且是 Redux,我找不到记录应用程序的最佳方式.一般来说,我不认为我应该混合使用它们,我认为 esdoc 更适合我,但我不完全相信我应该用 esdoc 生命周期钩子、属性类型、自己的方法等.

As my application is not only React, but also Redux, I cannot find the best way to document the application. Generally speaking, I don't think that I should mix both of them and I think esdoc suits me better, but I'm not fully convinced what should I be documenting with esdoc as of lifecycle hooks, proptypes, own methods, etc..

有没有人偶然发现这个问题并且可以告诉我记录这样一个应用程序的正确方法是什么?

Has anyone stumbled upon this problem and can tell me what's a proper way of documenting such an application?

推荐答案

一些用于记录 ES6 应用程序的工具:

Some tools for documenting your ES6 application:

Documentationjs 是一个新的文档生成器.它支持 ES6,并允许您以标准的 JSDoc 格式编写文档注释.

Documentationjs is a new documentation generator. It supports ES6 and allows you to write your doc comments in standard JSDoc format.

ESDoc 支持 JSDoc 语法,解析大部分 ES6 并输出良好,并且集成了 Mocha.

ESDoc supports JSDoc syntax, parses most of ES6 and outputs nice and it integrates Mocha.

JSDoc 部分支持 ES6.

JSDoc supports ES6 partially.

这篇关于如何正确记录 React/Redux 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆