最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Documenting JavascriptReact - Stack Overflow

programmeradmin0浏览0评论

I am looking for the best practices while documenting code in JavaScript or React ponents. What is out there that can be considered as "nice tools/libraries" while documenting? Thanks.

I am looking for the best practices while documenting code in JavaScript or React ponents. What is out there that can be considered as "nice tools/libraries" while documenting? Thanks.

Share Improve this question asked Nov 13, 2018 at 15:28 AlejandroAlejandro 832 silver badges8 bronze badges 1
  • this might help: react-styleguidist.js/docs/documenting.html – Tu Nguyen Commented Nov 13, 2018 at 15:31
Add a ment  | 

1 Answer 1

Reset to default 6

For JavaScript during a long time and still used currently there is JSdoc3.

JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You add documentation ments directly to your source code, right alongside the code itself. The JSDoc tool will scan your source code and generate an HTML documentation website for you.

But it looks like the support on this repository looks dead currently but it's still used by a lot of people.

Other alternatives there is :

  • yuidoc

    YUIDoc is a Node.js application that generates API documentation from ments in source, using a syntax similar to tools like Javadoc and Doxygen.

  • apidoc (But more focused for RESTful API)

    Inline Documentation for RESTful web APIs apiDoc creates a documentation from API annotations in your source code.


Now if you are looking for something more integrated with React/Components and a playground where users can play around with and view live code there is other choices (more oriented UI Components) :

  • React Styleguidist

    Isolated React ponent development environment with a living style guide

  • Storybook

    Storybook is a UI development environment and playground for UI ponents. The tool enables users to create ponents independently and showcase ponents interactively in an isolated development environment.

  • Docz

    Today, tools that allow us to be quick and effective in what we are doing are really necessary. We can't afford to lose time with tasks that should be trivial. This is why docz was created.

Docz and Styleguidist both have a playgrounds where users can play around with and view live code and automatic proptables that read out ponent proptypes. Documentation are written in MDX file for the first one and simple markdown for the second. Docz may be the easiest one to use but they can all fit your needs.

For Storybook I know it's a great tool but I never used it so I can tell you more about it.

JSDocs could also be used for documenting ponents but without interactive state.

发布评论

评论列表(0)

  1. 暂无评论