__docs__/GUIDELINES.md
This is a document about documentation (hence the file name).
The goals of this documentation are:
Our documentation supports the following use cases:
To support the first case, we provide a single entrypoint for the whole documentation, which will be the first step in a tree of docs with links to parents and children:
<root>/__docs__/README.md (with links to subsystems 1, 2, etc.)
Subsystem 1/__docs__/README.md (with links to root and subsystems 1.1,
1.2, etc.)
Subsystem 1.1/__docs__/README.md (with links to subsystem 1 and
subsystems 1.1.1, 1.1.2, etc.)Subsystem 1.2/__docs__/README.mdSubsystem 2/__docs__/README.mdThis structure will make it possible for the user to navigate across the documentation organically, just following links within the documents themselves.
To support the second use case, focusing on a specific subsystem, we will describe what are the relationships between that subsystem and others, to make sure that changes to its API are understood, and that usages of other subsystems are considered.
The use of the __docs__ directory (inspired by Python) has 2 goals:
__tests__).Use this template to write the documentation for a subsystem, adding the appropriate subsections depending on what that documentation requires. Only diverge from this structure if it is strictly necessary (removing unnecessary or empty sections is fine).
Include supporting images and diagrams in the documentation. Those assets should
be placed in the same __docs__ directory as the README.md file. Use relative
paths to link to the assets in those directories.
If you include Excalidraw diagrams, make sure to export an SVG image from the
website using the "Embedded scene" option, so the original diagram is included
in the file and can be re-uploaded to Excalidraw for future modifications. Use
the extension .excalidraw.svg to signal this.
The level of granularity in the definition of the subsystems should be enough to correctly describe how React Native works, but not so detailed that any changes in the code require changes in the documentation.
Examples:
When a specific subsystem exists in multiple directories (e.g.: platform-specific ones, C++, JavaScript, etc.):