Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@react-native-sandbox/docs
Advanced tools
A plugin for react-native-sandbox to enable support for documentation
Adds flexible documentation to react-native-sandbox
.
Requires react-native-sandbox
. Ensure that your sandbox is configured correctly before proceeding.
Open a terminal in your project's folder and run
npm install @react-native-sandbox/docs
Modify your sandbox root to load the plugin:
import DocsPlugin from '@react-native-sandbox/docs';
// ...
function Sandbox() {
return <SandboxRoot components={comonents} plugins={[DocsPlugin]}>
}
Documentation is registered to a sandbox by using the useDoc
hook. At the moment this can only be called once per sandbox. The supported content type is text in the form of a string.
import MyComponent from './MyComponent';
import { useDocs } from '@react-native-sandbox/docs';
import documentation from './documentation.txt';
function MyComponentSandbox() {
// renders a panel containing the provided content
useDocs(documentation);
return (<MyComponent />);
}
Support for additional content types such as Markdown and React coming soon.
The plugin can be configured as follows:
import DocsPlugin from '@react-native-sandbox/docs';
// ...
const plugin = DocsPlugin.configure(options);
Where the following options are available:
Key | Type | Description |
---|---|---|
renderer | ComponentType | Global override for the default document renderer. Useful for customizing the way content is rendered. For example can replace with a markdown, PDF, or other renderer. Passes content prop with the value from the useDoc hook. |
FAQs
A plugin for react-native-sandbox to enable support for documentation
The npm package @react-native-sandbox/docs receives a total of 825 weekly downloads. As such, @react-native-sandbox/docs popularity was classified as not popular.
We found that @react-native-sandbox/docs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.