Improve the react example
This commit is contained in:
parent
e5df0e3c97
commit
da36537264
2 changed files with 1 additions and 2 deletions
examples/cra
|
@ -10,7 +10,7 @@
|
|||
"@types/node": "^16.11.21",
|
||||
"@types/react": "^17.0.38",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"automerge-wasm": "file:../automerge-wasm-v0.1.0.tgz",
|
||||
"automerge-wasm": "file:../../automerge-wasm/automerge-wasm-v0.1.0.tgz",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-scripts": "5.0.0",
|
||||
|
|
|
@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
|
|||
import './App.css';
|
||||
import * as Automerge from "automerge-wasm"
|
||||
|
||||
|
||||
function App() {
|
||||
const [ doc, ] = useState(Automerge.create())
|
||||
const [ edits, ] = useState(doc.set("_root", "edits", Automerge.TEXT) || "")
|
||||
|
|
Loading…
Add table
Reference in a new issue