Skip to content

Commit 97e6d25

Browse files
authored
Update README.md (#415)
1 parent d5d37ea commit 97e6d25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ npm i --save react-avatar-editor
2929
pnpm add react-avatar-editor
3030
```
3131

32-
## [Demo](https://react-avatar-editor.netlify.com/)
32+
## [Demo](https://react-avatar-editor.netlify.app/)
3333

3434
![](https://thumbs.gfycat.com/FlawedBlushingGermanwirehairedpointer-size_restricted.gif)
3535

@@ -90,7 +90,7 @@ The resulting image will have the same resolution as the original image, for tha
9090
If you want the image sized in the dimensions of the canvas you can use `getImageScaledToCanvas`.
9191

9292
```javascript
93-
import React from 'react'
93+
import React, { useRef } from 'react'
9494
import AvatarEditor from 'react-avatar-editor'
9595

9696
const MyEditor = () => {
@@ -169,7 +169,7 @@ _Note that:_ `getImage()` returns a canvas element and if you want to use it in
169169

170170
```js
171171
const getImageUrl = async () => {
172-
const dataUrl = editor.getImage().toDataURL()
172+
const dataUrl = editor.current.getImage().toDataURL()
173173
const res = await fetch(dataUrl)
174174
const blob = await res.blob()
175175

0 commit comments

Comments
 (0)