open-rpc/docs-react

Write readme on how to use

Closed this issue ยท 1 comments

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"));

๐ŸŽ‰ This issue has been resolved in version 1.0.4 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€