Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pikasojs/pikaso-react-hook
⚛️ Pikaso React Hook
https://github.com/pikasojs/pikaso-react-hook
Last synced: about 17 hours ago
JSON representation
⚛️ Pikaso React Hook
- Host: GitHub
- URL: https://github.com/pikasojs/pikaso-react-hook
- Owner: pikasojs
- License: mit
- Created: 2020-12-25T19:59:58.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T15:39:41.000Z (over 2 years ago)
- Last Synced: 2024-10-28T15:11:01.857Z (11 days ago)
- Language: TypeScript
- Homepage:
- Size: 2.09 MB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pikaso-react-hook
React hook for [Pikaso](https://github.com/pikasojs/pikaso)![Language](https://badgen.net/badge/icon/typescript?icon=typescript&label=Language)
![Test, Build and Publish](https://github.com/pikasojs/pikaso-react-hook/workflows/Test,%20Build%20and%20Publish/badge.svg)
![npm](https://badgen.net/npm/v/pikaso-react-hook)
![coverage](https://img.shields.io/coveralls/github/pikasojs/pikaso-react-hook)## Install
#### NPM
`npm install pikaso-react-hook --save`#### Yarn
`yard add pikaso-react-hook`## Getting Started
```ts
import React from 'react'
import usePikaso from 'pikaso-react-hook'export function Component() {
const [ref, editor] = usePikaso()
const createCircle = () => {
editor.shapes.circle.insert({
x: 200,
y: 200,
radius: 50,
fill: 'red'
})
}return (
<>
Create Circle
>
)
}
```## Demo
https://codesandbox.io/s/pikaso-react-hook-example-i0uwg## Documentation
https://github.com/pikasojs/pikaso