How to use the rxdb.QueryChangeDetector.enable function in rxdb

To help you get started, we’ve selected a few rxdb 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 eh3rrera / react-rxdb-example / src / App.js View on Github external
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

import * as RxDB from 'rxdb';
import {QueryChangeDetector} from 'rxdb';
import { schema } from './Schema';

import { ToastContainer, toast } from 'react-toastify';
// The following line is not needed for react-toastify v3, only for v2.2.1
//import 'react-toastify/dist/ReactToastify.min.css';

import * as moment from 'moment';

QueryChangeDetector.enable();
QueryChangeDetector.enableDebugging();

RxDB.plugin(require('pouchdb-adapter-idb'));
RxDB.plugin(require('pouchdb-adapter-http'));

const syncURL = 'http://localhost:5984/';
const dbName = 'chatdb';

class App extends Component {

  constructor(props) {
    super(props);
    this.state = {
      newMessage: '', messages: []
    };
    this.subs = [];

rxdb

A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/

Apache-2.0
Latest version published 20 days ago

Package Health Score

80 / 100
Full package analysis