Package Exports
- rhine-var
- rhine-var/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rhine-var) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
The most concise and rigorous strongly-typed real-time collaborative editing library.
Variables that support multi-user collaboration and persistence, making collaboration and variable operations as simple as possible, with strict and well-defined type hints.
Install
npm i rhine-var
Or with yarn:
yarn add rhine-var
Usage
const defaultValue = {value: 0}
const count = rhineProxy(defaultValue, 'RhineAI.com/ws/room-0')
function EasyCounter() {
const countSnap = useRhine(count)
return <div className='page'>
<button onClick={() => count.value-- }> - 1 </button>
<span>{countSnap.value}</span>
<button onClick={() => count.value++ }> + 1 </button>
</div>
}
Develop With US
Start Debug Mode
npm run watch
cd test/debug/next-app
npm run dev