Write readme on how to use
Closed this issue ยท 1 comments
shanejonas commented
docs-react
What is this?
This is a react component that will render documentation for a given OpenRPC document.
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"));
shanejonas commented
๐ This issue has been resolved in version 1.0.4 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐