import { useState } from "react";
export class SharedValue {
    state;
    constructor(state) {
        this.state = state;
    }
    get() {
        return this.state[0];
    }
    set(value) {
        this.state[1](value);
    }
}
/**
 * Share a stateful value
 */
export function useSharedValue(initialValue) {
    const state = useState(initialValue);
    return new SharedValue(state);
}
//# sourceMappingURL=useSharedValue.js.map