This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit Ryan Carniato https://frontendmasters.com/courses/reactivity-solidjs/ | |
let context = []; | |
export function untrack(fn) { | |
const prevContext = context; | |
context = []; | |
const res = fn(); | |
context = prevContext; | |
return res; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useSyncExternalStore } from 'react' | |
/** | |
* This will call the given callback function whenever the contents of the map | |
* change. | |
*/ | |
class ObservableMap extends Map { | |
constructor(entries) { | |
super(entries) | |
this.listeners = new Set() |
Bucardo is unfortunately not very good at reporting its progress. This guide details the most important parts.
Note: This mostly assumes you're using Bucardo with onetimecopy=1
There are three major states of Bucardo we care about:
- Truncating a table on the new database
- Doing the initial copy from old to new database
- Live replication mode from old to new (aka “delta mode”)
OlderNewer