* feat(player): lazy JS DOM node creation; (need fixes for reaching full potential) * fix(player): drasticly reduce amount of node getter call during virtual node insertion * feat(player/VirtualDOM): OnloadVRoot & OnloadStyleSheet for lazy iframe innerContent initialisation & elimination of forceInsertion requirement in this case;; few renamings * style(player): few renamings; comments improved * feat(player/DOMManager): VirtualNodes insertion prioretization (for styles) --------- Co-authored-by: Alex Kaminskii <alex@openreplay.com>
13 lines
252 B
TypeScript
13 lines
252 B
TypeScript
import { Store } from './types'
|
|
|
|
export default class SimpleSore<G, S=G> implements Store<G, S> {
|
|
constructor(private state: G){}
|
|
get(): G {
|
|
return this.state
|
|
}
|
|
update(newState: Partial<S>) {
|
|
Object.assign(this.state, newState)
|
|
}
|
|
}
|
|
|
|
|