If you currently not using a service worker resulting in old production caches being used and users not getting new versions of the app.
src/index.js
Use:
import { unregister as unregisterServiceWorker } from './registerServiceWorker'| function hashStringToInt(s, tableSize) { | |
| let hash = 17; | |
| for (let i = 0; i < s.length; i++) { | |
| hash = (13 * hash * s.charCodeAt(i)) % tableSize; | |
| } | |
| return hash; | |
| } |
Project root:
yarn add -D --save-exact eslint-config-airbnb eslint-config-airbnb-typescript eslint-config-prettier eslint-config-react-app eslint-import-resolver-typescript eslint-webpack-plugin eslint-plugin-flowtype eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks babel-eslint eslint-plugin-jest @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier prettier-eslint prettier-eslint-cli eslint-plugin-prettier
$ vim .eslintrc
{
"plugins": ["prettier", "@typescript-eslint"],
| const strongPassword = new RegExp( | |
| '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})' | |
| ); | |
| const mediumPassword = new RegExp( | |
| '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})' | |
| ); | |
| export const isPasswordStrong = (value = ''): boolean => { | |
| if (strongPassword.test(value)) { |
| const array1 = [{num: 1}, {num: 1}, {num: 1}, {num: 1}]; | |
| console.log(array1.reduce((count, item) => { | |
| return count += item.num; | |
| },0)) | |
| export const facebookLogin = async () => { | |
| try { | |
| const { type, token } = await Facebook.logInWithReadPermissionsAsync('<YOUR APP ID>', { | |
| permissions: ['public_profile', 'email', 'user_birthday'], | |
| behavior: 'native', | |
| }); | |
| if (type === 'success') { | |
| // Get the user's name using Facebook's Graph API | |
| const credential = firebase.auth.FacebookAuthProvider.credential(token) |
| //Basic sum | |
| #include <stdio.h> | |
| int | |
| main () | |
| { | |
| /* variable definition: */ | |
| int num1, num2; |
| heroku create <AppName> --buildpack https://github.com/mars/create-react-app-buildpack.git |