How to use the dop.createObserver function in dop

To help you get started, we’ve selected a few dop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elevenyellow / coinfy / src / components / views / Create / new.js View on Github external
componentWillMount() {
        state.view = {
            step: 0,
            password: '',
            repassword: '',
            words_shuffle_clicked: [],
            word_wrong_selected: false
        }

        this.observer = createObserver(m => this.forceUpdate())
        this.observer.observe(state.view)
        this.observer.observe(state.view.words_shuffle_clicked, 'length')

        const { symbol } = getParamsFromLocation()
        this.words = getRandomMnemonic().split(' ')
        this.words_shuffle = []
        this.Coin = Coins[symbol]

        // binding
        this.onChangePassword = this.onChangePassword.bind(this)
        this.onChangeRepassword = this.onChangeRepassword.bind(this)
        this.onVerifyWord = this.onVerifyWord.bind(this)
        this.onNext = this.onNext.bind(this)
        this.onBack = this.onBack.bind(this)
        this.onPrint = this.onPrint.bind(this)
        this.onClear = this.onClear.bind(this)
github elevenyellow / coinfy / web / src / components / partials / AssetListItem.js View on Github external
componentWillMount() {
        const asset = this.props.asset
        this.observer = createObserver(mutations => this.forceUpdate())
        this.observer.observe(state.location, 'pathname')
        this.observer.observe(state.prices)
        this.observer.observe(state.assets)
        this.observer.observe(asset, 'label')
        this.observer.observe(asset, 'balance')

        // binding
        this.onClick = this.onClick.bind(this)
    }
    componentWillUnmount() {
github elevenyellow / coinfy / src / components / partials / Popups.js View on Github external
componentWillMount() {
        this.observer = createObserver(mutations => this.forceUpdate())
        this.observer.observe(state.popups.closeSession, 'open')
        

        // binding
    }
    componentWillUnmount() {
github elevenyellow / coinfy / src / components / views / BTC / Delete.js View on Github external
componentWillMount() {
        this.observer = createObserver(m => this.forceUpdate())
        this.observer.observe(state.view)

        // Initial state
        state.view = {
            confirmed: false
        }

        // binding
        // this.onChangeEncryption = this.onChangeEncryption.bind(this)
    }
    onConfirm() {
github DistributedObjectProtocol / dop / examples / todomvc / src / components / TodoItem.js View on Github external
componentWillMount() {
        this.todo = store.todos[this.props.index]
        this.observer = createObserver(m => this.forceUpdate());
        this.unobserveTodo = this.observer.observe(this.todo)
    }
github elevenyellow / coinfy / src / components / partials / AssetList.js View on Github external
componentWillMount() {
        this.observer = createObserver(mutations => this.forceUpdate())
        this.observer.observe(state, 'assets')
        this.observer.observe(state.assets)
    }
    componentWillUnmount() {
github elevenyellow / coinfy / src / components / partials / AssetListItem.js View on Github external
observe(asset) {
        this.observer = createObserver(mutations => this.forceUpdate())
        this.observer.observe(state.location, 'pathname')
        this.observer.observe(state.prices)
        this.observer.observe(state.assets)
        this.observer.observe(asset, 'label')
        this.observer.observe(asset, 'balance')
    }
github DistributedObjectProtocol / dop / examples / todomvc / src / components / Header.js View on Github external
componentWillMount() {
        const observer = createObserver(m => this.forceUpdate());
        observer.observe(store.todos, 'length');
        observer.observe(store, 'newTodoText');
        observer.observe(store, 'areAllItemsCompleted');
    }
github DistributedObjectProtocol / dop / examples / todomvc / src / components / Todos.js View on Github external
componentWillMount() {
        const observer = createObserver(m => this.forceUpdate());
        observer.observe(store.todos, 'length');
        observer.observe(store, 'selectedFilter');
        observer.observe(store, 'itemsLeftCount');
    }
github DistributedObjectProtocol / dop / examples / todomvc / src / components / Footer.js View on Github external
componentWillMount() {
        const observer = createObserver(m => this.forceUpdate());
        observer.observe(store, 'itemsLeftCount');
        observer.observe(store, 'selectedFilter');
        observer.observe(store, 'completedCount');
    }

dop

Distributed Object Protocol.

MIT
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis

Popular dop functions