Skip to content

Write readme on how to use #9

@shanejonas

Description

@shanejonas

docs-react

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} />
In a new project:

Here's how it would be used in a new npm init react-app --typescript <appname> project:

import React from "react";
import ReactDOM from "react-dom";
import Documentation from "@open-rpc/docs-react";

const schema = {
  "info": {
    "title": "My New API"
  }
};

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions