SyncState

SyncState

  • Docs
  • FAQ
  • Github
  • Hire The Creators

›Examples

Introduction

  • Getting started
  • Installation
  • Motivation
  • Core Concepts

Recipes

  • Recipes

Examples

  • Counter
  • Counter with Undo / Redo
  • Todo app
  • Multi User Counter
  • Multi User Todo
  • Multi User Todo With Undo/Redo

Plugins

  • History
  • Remote

API Reference

  • API Overview
  • createDocStore
  • Store
  • Provider
  • useDoc
  • useSyncState

Tips & Tricks

  • Common Pitfalls & Best Practices
  • Using SyncState without React
  • Performance Tuning

FAQ

  • FAQ's

Multi User Counter

A counter app example that syncs across multiple sessions and is persistent to new connections.

Multi-User-Counter

View Github Code

Instructions

  1. Clone the github repository

git clone https://github.com/syncstate/multi-user-counter-example.git
  1. Install local dependencies

# NPM
npm install

# Yarn
yarn install
  1. Run the server

cd server
node index.js

Runs the server at port 8000 to establish socket connection with the client.

  1. Run the App
# NPM
npm start

# Yarn
yarn start

Runs the app in the development mode.

Open http://localhost:3000 to view it in the browser.

← Todo appMulti User Todo →
  • Instructions
    • Clone the github repository
    • Install local dependencies
    • Run the server
Docs
Getting StartedExamplesPluginsAPI ReferenceFAQ
Community
TwitterStack OverflowDiscord
More
GitHub   Contribution Guidelines
Stars
Built with ❤️ at GeekyAnts.
Copyright © 2020 SyncState