1.0.2 • Published 6 years ago
mliffx v1.0.2
mliffx
MobX Store for LINE Frontend Framework state
Installation
npm i mliffxUsage
Initialize
In your entry file
import MLIFFXStore from 'mliffx'
mliffx.init()MLIFFX Properties
isInit: boolean
It will be true if LIFF is initialized.
error: Error
It will be defined if LIFF is failed to initialize.
userProfile: DataStore< UserProfile >
It will return data store of user profile
accessToken: DataStore< string >
It will return data store of accessToken
DataStore
Example of calling value in DataStore
userProfile.valueValue Structure
value: TGeneric Type depend on datafetched: booleanwill be true if store is fetchedloading: booleanwill be true if store is fetching