This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Author: Mr. Cheng Sokdara | |
| import React, { | |
| Dispatch, | |
| FC, | |
| createContext, | |
| useContext, | |
| useReducer, | |
| } from "react"; | |
| import initialState, { StoreState } from "./initialState"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Author: Sokdara Cheng | |
| // Contact me for web or mobile app development using React or React Native | |
| // https://chengsokdara.github.io | |
| import React, { createContext, useContext, useReducer } from "react"; | |
| import initialState from "./initialState"; // object of initial states | |
| import reducer from "./reducer"; // https://reactjs.org/docs/hooks-reference.html#usereducer | |
| const Store = createContext({ | |
| dispatch: () => null, | |
| state: initialState, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect } from "react"; | |
| import useStora from "@rawewhat/stora"; | |
| const App = () => { | |
| return ( | |
| <div> | |
| StoRa Demo | |
| <TestScreen /> | |
| <DemoScreen /> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| // This will be where you initialize your states | |
| states: { | |
| testScreen: { | |
| testState: 'testState' | |
| }, | |
| demoScreen: { | |
| demoState: 'demoState' | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const functions = require('firebase-functions'); | |
| const Telegraf = require('telegraf'); | |
| // // Create and Deploy Your First Cloud Functions | |
| // // https://firebase.google.com/docs/functions/write-firebase-functions | |
| // | |
| // exports.helloWorld = functions.https.onRequest((request, response) => { | |
| // response.send("Hello from Firebase!"); | |
| // }); | |
| const bot = new Telegraf(functions.config().bot.token); |