627d1af5ad | ||
---|---|---|
.vscode | ||
src | ||
tests | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.npmrc | ||
.prettierrc | ||
LICENSE | ||
README.md | ||
jestconfig.json | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Tuitio client react
Introduction
Tuitio client react 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-client-react@1.0.0
- from the package.json file:
"@flare/tuitio-client-react": "1.0.0"
How to use the package
const { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } = require("@flare/tuitio-client-react");
const TuitioProvider = require("@flare/tuitio-client-react");
import { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken } from "@flare/tuitio-client-react";
import TuitioProvider from "@flare/tuitio-client-react";
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