react-kityminder
v0.5.0
Published
Mind map for react, based on kityminder.
Downloads
23
Maintainers
Readme
React Kityminder
Mind map for react, based on kityminder.
Installation
NPM
npm install react-kityminder --save
import Kityminder from 'react-kityminder';
Browser
Direct <script>
include
<script src="https://cdn.jsdelivr.net/npm/kity"></script>
<script src="https://cdn.jsdelivr.net/npm/kityminder-core"></script>
<script src="https://cdn.jsdelivr.net/npm/react-kityminder"></script>
Usage
import { useState, useRef } from 'react'
function App(props) {
const [value, setValue] = useState({})
const minderRef = useRef()
const minder = minderRef.current
const onChange = setValue
return (
<Kityminder
ref={minderRef}
value={value}
onChange={onChange}
/>
)
}