Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@open-rpc/docs-react

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-rpc/docs-react

OpenRPC documentation as a react component

  • 1.2.4
  • npm
  • Socket score

Version published
Weekly downloads
73
decreased by-17.05%
Maintainers
2
Weekly downloads
 
Created
Source

docs-react

OpenRPC documentation as a react component

What is this?

This is a react component that will render documentation for a given OpenRPC document.

Screenshot:

image

How do I use this?
Installation:
npm install --save @open-rpc/docs-react
Usage:
import Documentation from "@open-rpc/docs-react";

and then use it somewhere:

<Documentation schema={schema} />
Example in a new project:
create a new typescript project with create-react-app
npx create-react-app <appname> --typescript
cd <appname>
npm install .
npm install @open-rpc/docs-react @open-rpc/meta-schema --save
index.ts
import React from 'react';
import ReactDOM from 'react-dom';
import Documentation from "@open-rpc/docs-react";
import { OpenrpcDocument } from '@open-rpc/meta-schema';

const schema: OpenrpcDocument = {
  openrpc: "1.2.4",
  info: {
    "version": "0.0.0-development",
    "title": "My New API"
  },
  methods: []
};

ReactDOM.render(<Documentation schema={schema} />, document.getElementById("root"));

screenshot

image

FAQs

Package last updated on 01 Dec 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc