简体   繁体   English

如何正确记录React / Redux应用程序?

[英]How to properly document a React/Redux application?

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. 我目前正在记录用ES6编写的React / Redux应用程序,但我找不到任何有用的信息,这是记录React应用程序的最恰当方式。

In this post , the tool react-docgen is presented, and I have stumble upon esdoc as well. 在这篇文章中 ,提出了工具react-docgen ,我也偶然发现了esdoc Whereas esdoc does automatic generation of documentation, react-docgen extracts the information of the React components and puts it into a JSON file. esdoc会自动生成文档,而react-docgen会提取React组件的信息并将其放入JSON文件中。

As my application is not only React, but also Redux, I cannot find the best way to document the application. 由于我的应用程序不仅是React,还有Redux,我找不到记录应用程序的最佳方法。 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.. 一般来说,我不认为我应该混合使用它们,我认为esdoc更适合我,但我不完全相信我应该用esdoc记录生命周期钩子,proptypes,自己的方法等等。

Has anyone stumbled upon this problem and can tell me what's a proper way of documenting such an application? 有没有人偶然发现这个问题,可以告诉我记录这样一个应用程序的正确方法是什么?

Some tools for documenting your ES6 application: 一些用于记录ES6应用程序的工具:

documentationjs documentationjs

Documentationjs is a new documentation generator. Documentationjs是一个新的文档生成器。 It supports ES6 and allows you to write your doc comments in standard JSDoc format. 它支持ES6并允许您以标准JSDoc格式编写文档注释。

ESDoc ESDoc

ESDoc supports JSDoc syntax, parses most of ES6 and outputs nice and it integrates Mocha . ESDoc支持JSDoc语法,解析大部分ES6并输出不错,它集成了Mocha

JSDoc JSDoc

JSDoc supports ES6 partially. JSDoc部分支持ES6。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM