Creates a reactive variable synchronized across browsing contexts. It is a swap-in replacement for makeVar.
Initial value of the reactive variable.
A unique identifier used to synchronize the variable across contexts.
Optional
import { useReactiveVar } from '@apollo/client/react'import { makeVarSynced } from 'apollo-state-sync'const rVarSynced = makeVarSynced('random-value','a-unique-name') Copy
import { useReactiveVar } from '@apollo/client/react'import { makeVarSynced } from 'apollo-state-sync'const rVarSynced = makeVarSynced('random-value','a-unique-name')
Creates a reactive variable synchronized across browsing contexts. It is a swap-in replacement for makeVar.