From 5454ea62f77129ab5b73e967783870804904ce76 Mon Sep 17 00:00:00 2001 From: Joe Innes Date: Mon, 27 Jul 2020 23:30:58 +0200 Subject: [PATCH] More verbose example Added feathers client configuration --- docs/content/_index.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/content/_index.md b/docs/content/_index.md index 771d40e..2829ab9 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -54,13 +54,21 @@ $ npm install figbird ```js import React, { useState } from 'react' -import createFeathersClient from '@feathersjs/feathers' +import io from 'socket.io-client' +import feathers from '@feathersjs/client' import { Provider, useFind } from 'figbird' +const socket = io('http://localhost:3030') +const client = feathers() + +client.configure(feathers.socketio(socket)) +client.configure(feathers.authentication({ + storage: window.localStorage +})) + function App() { - const [feathers] = useState(() => createFeathersClient()) return ( - + )