Tuitio client react is an npm package written in typescript that facilitates the integration of a react application with Tuitio.
 
Go to file
Tudor Stanciu 1a3b808e9c 1.2.4 - Upgraded @flare/tuitio-client. 2023-04-04 08:59:01 +03:00
.vscode 100% test coverage 2023-02-12 03:27:22 +02:00
src 1.2.3 - User roles were handled in useTuitioUserInfo hook. 2023-04-03 19:14:35 +03:00
tests 1.2.3 - User roles were handled in useTuitioUserInfo hook. 2023-04-03 19:14:35 +03:00
.eslintignore react typescript package 2023-02-11 20:52:00 +02:00
.eslintrc react typescript package 2023-02-11 20:52:00 +02:00
.gitignore react typescript package 2023-02-11 20:52:00 +02:00
.npmrc tuitio-react-client package initialization 2023-02-11 05:11:27 +02:00
.prettierrc react typescript package 2023-02-11 20:52:00 +02:00
LICENSE react typescript package 2023-02-11 20:52:00 +02:00
README.md 1.2.4 - Upgraded @flare/tuitio-client. 2023-04-04 08:59:01 +03:00
jestconfig.json 100% tests coverage 2023-02-11 22:12:13 +02:00
package-lock.json 1.2.4 - Upgraded @flare/tuitio-client. 2023-04-04 08:59:01 +03:00
package.json 1.2.4 - Upgraded @flare/tuitio-client. 2023-04-04 08:59:01 +03:00
tsconfig.json react typescript package 2023-02-11 20:52:00 +02:00

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, useTuitioUserInfo } =  require("@flare/tuitio-client-react");
const TuitioProvider = require("@flare/tuitio-client-react");

import { TuitioProvider, useTuitioClient, useTuitioUser, useTuitioToken, useTuitioUserInfo } 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
1.0.1 - Added useTuitioClient default options
1.1.0 - In this version, the account logout method and the latest changes published by Tuitio were implemented
1.1.1 - Account logout bug fix
1.2.0 - Has been implemented the "user-info" method exposed by the Tuitio API and the latest changes published by "@flare/tuitio-client".
1.2.1 - Added decodedToken in useTuitioToken hook. The token is obtained directly from TuitioProvider's react context.
1.2.2 - Upgraded @flare/tuitio-client and @flare/js-utils packages.
1.2.3 - User roles were handled in useTuitioUserInfo hook.
1.2.4 - Upgraded @flare/tuitio-client.