Skip to content

Commit

Permalink
Revert "fix: standalone build (#32)" (#40)
Browse files Browse the repository at this point in the history
This reverts commit 359af25.
  • Loading branch information
xiaoyuhen authored Mar 26, 2019
1 parent 32d37bb commit 62c9686
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/griffith-standalone/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@ import ReactDOM from 'react-dom'
import Player from 'griffith'

export function createPlayer(target) {
function render(props) {
ReactDOM.render(<Player {...props} />, target)
}

render()

return {
render(props) {
render(props)
return this
ReactDOM.render(<Player {...props} />, target)
},

dispose() {
ReactDOM.render(null, target)
return this
ReactDOM.unmountComponentAtNode(target)
},
}
}

0 comments on commit 62c9686

Please sign in to comment.