20a1fcb7dd | ||
---|---|---|
.vscode | ||
src | ||
tests | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.npmrc | ||
.prettierrc | ||
LICENSE | ||
README.md | ||
jestconfig.json | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Tuitio react client
Introduction
Tuitio react client is an npm package written in typescript that facilitates the integration of a react application with Tuitio.
This package uses tuitio-client internally and adds state management through react contexts and various react hooks through which the user has access to data and actions.
Package installation
The package installation can be done in two ways:
- from the command line:
npm install @flare/tuitio-react-client@1.0.0
- from the package.json file:
"@flare/tuitio-react-client": "1.0.0"
How to use the package
const { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } = require("@flare/tuitio-react-client");
const TuitioProvider = require("@flare/tuitio-react-client");
import { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } from "@flare/tuitio-react-client";
import TuitioProvider from "@flare/tuitio-react-client";
Unit testing
Unit testing is done using Jest. This is an awesome testing framework created by Facebook.
The files containing tests are identified by the extension *.test.ts
.
All tests in the package can be executed by running: npm test
.
Changelog
1.0.0 - Package initialization