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
| RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
| npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
| Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
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
| REMIX EXAMPLE PROJECT | |
| Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
| It contains 3 directories: | |
| 1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
| 2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
| 3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
| SCRIPTS |
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
| parallelLimit |
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
| var x, | |
| xLen, | |
| log = [], | |
| total = 0; | |
| for (x in localStorage) { | |
| if (!localStorage.hasOwnProperty(x)) { | |
| continue; | |
| } | |
| xLen = (localStorage[x].length * 2 + x.length * 2) / 1024; | |
| log.push(x.substr(0, 30) + " = " + xLen.toFixed(2) + " KB"); |
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, { PureComponent } from "react"; | |
| import ErrorIndicator from "../ErrorIndicator"; | |
| class ErrorBoundary extends PureComponent { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| hasError: false | |
| }; |
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 { | |
| onSnapshot, | |
| applySnapshot, | |
| getParent, | |
| getRoot, | |
| getIdentifier, | |
| isStateTreeNode, | |
| resolveIdentifier, | |
| types, | |
| } from 'mobx-state-tree'; |
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 function safeReference(T) { | |
| return types.reference(T, { | |
| get(identifier, parent) { | |
| if (isStateTreeNode(identifier)) { | |
| identifier = getIdentifier(identifier); | |
| } | |
| return resolveIdentifier(T, parent, identifier); | |
| }, | |
| set(value) { | |
| return value; |
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 { types, flow, getRoot } from 'mobx-state-tree'; | |
| import Api from 'src/api'; | |
| export const AuthStore = types.model('AuthStore', { | |
| loginFlow: asyncModel(loginFlow), | |
| registerFlow: asyncModel(registerFlow), | |
| }); | |
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 createProxy = require('http-proxy-middleware'); | |
| const proxy = createProxy({ | |
| target: 'https://apiko-marketplace-api-2019.herokuapp.com/', | |
| pathRewrite: { | |
| '^/api': '', | |
| }, | |
| changeOrigin: true, | |
| }); |
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
| function createStore(reducer, initialState) { | |
| return { | |
| _reducer: reducer, | |
| _state: initialState, | |
| _listeners: [], | |
| dispatch(action) { |
NewerOlder