Signal drop!
Relay (operand.online) is unreachable.
Usually, a dropped signal means an upgrade is happening. Hold on!
Sorry, no connección.
Hang in there while we get back on track
gram:page
> ./src/spine.tsx
Lenses
(coming soon!)
import { Component, createRef } from "react"
import {EditorView} from "prosemirror-view"
class Spine extends Component {
constructor(props) {
super(props)
this.spine = createRef()
}
componentDidMount() {
this.page = new EditorView(
this.spine.current,
{ state: this.props.page }
)
}
componentDidUpdate(priorProps, priorState) {
if(page) this.page.updateState(page)
else this.page && this.page.destroy()
}
componentWillUnmount = () => this.page && this.page.destroy()
render = () => <div id="page" ref={this.spine}></div>
}
export default Spine