"use client";import { APP_COUNTER } from "@/lib/variables";import { useBaguni } from "baguni";const CounterButton = () => {const [appCounter, setAppCounter] = useBaguni(APP_COUNTER);return (<button onClick={() => {setAppCounter(appCounter + 1);}}>Add 1 to counter</button>);};export default CounterButton;
"use client";import { APP_COUNTER } from "@/lib/variables";import { useBaguni } from "baguni";const CounterComponent = () => {const [appCounter] = useBaguni(APP_COUNTER);return (<div><div> Counter: {appCounter}</div></div>);};export default CounterComponent;
Counter: 0