How to use the mobx-utils.deepObserve function in mobx-utils

To help you get started, we’ve selected a few mobx-utils 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 NUbots / NUsight2 / src / client / components / script_tuner / utils.ts View on Github external
function setupDirtyWatcher(viewModel: DataViewModel) {
  const dispose = deepObserve(viewModel, (change, path) => {
    viewModel.isDirty = true
    dispose()
  })
}
github meetalva / alva / packages / core / src / renderer / create-notifiers.ts View on Github external
if (!project) {
				return;
			}

			if (
				projectSync.id &&
				projectSync.id !== project.getId() &&
				typeof projectSync.stop === 'function'
			) {
				projectSync.stop();
				projectSync.id = undefined;
			}

			if (!projectSync.id) {
				projectSync.stop = MobxUtils.deepObserve(project, onProjectChange(app));
				projectSync.id = project.getId();
			}
		},
		{
github meetalva / alva / src / renderer / create-notifiers.ts View on Github external
Mobx.autorun(() => {
		const project = store.getProject();

		if (typeof stopProjectSync === 'function') {
			stopProjectSync();
		}

		stopProjectSync = MobxUtils.deepObserve(project, onProjectChange(app));
	});
github meetalva / alva / packages / core / src / renderer / create-notifiers.ts View on Github external
() => {
			const app = store.getApp();

			if (!app) {
				return;
			}

			if (appSync.id && appSync.id !== app.getId() && typeof appSync.stop === 'function') {
				appSync.stop();
				appSync.id = undefined;
			}

			if (!appSync.id) {
				appSync.stop = MobxUtils.deepObserve>(
					app,
					onAppChange(app)
				);
				appSync.id = app.getId();
			}
		},
		{
github meetalva / alva / src / renderer / create-notifiers.ts View on Github external
Mobx.autorun(() => {
		const app = store.getApp();

		if (typeof stopAppSync === 'function') {
			stopAppSync();
		}

		stopAppSync = MobxUtils.deepObserve(app, onAppChange(app));
	});
}