React hooks for handling server-push technologies:
- use-socketio for Socket.io
- use-server-sent-events for Server Sent Events
- use-websockets for Websocket
To run samples locally, you can:
$ git clone https://github.com/mfrachet/server-push-hooks
$ cd server-push-hooks
$ npm install # install lerna and dependencies at the root
$ npm run bootstrap # install lerna packages dependencies
$ npm run build # build the lerna packages
$ npm start # start the web application
$ npm start:test-server # start the backend services in another terminal
$ npm run e2e # run E2E tests of the projects in another terminal