All situations

Mostly HTML. A few parts need the same state.

One small store. No SPA, no syncing by hand.

document.querySelectorAlladdEventListener

Pricing
Starter $9Team $29
pricing.js · no framework
export const $period = atom<Period>('monthly')
$period.subscribe((period) => {
  for (const el of document.querySelectorAll<HTMLElement>('[data-price]')) {
    el.textContent = el.dataset[period] ?? ''
  }
})
toggle.addEventListener('change', () =>
  $period.set(toggle.checked ? 'yearly' : 'monthly'),
)

Just one local toggle? Plain JavaScript is enough.

npm install nanostores
Getting started →

No app logic in React hooks →Two islands need the same data →Persistent Store ↗