This file contains 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
Descriptive: Naming Styles | |
There are a lot of different naming styles. It helps to be able to recognize what naming style is being used, independently from what they are used for. | |
The following naming styles are commonly distinguished: | |
b (single lowercase letter) | |
B (single uppercase letter) | |
lowercase | |
lower_case_with_underscores | |
UPPERCASE |
This file contains 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
# pull official base image | |
FROM node:14 AS builder | |
# set working directory | |
WORKDIR /app | |
# install app dependencies | |
#copies package.json and package-lock.json to Docker environment | |
COPY package.json ./ |
This file contains 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
'git log' failed with code 1:'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun' | |
'git status' failed with code 1:'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun' | |
=> Fix : | |
- Open terminal | |
- Run: xcode-select --install |
This file contains 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
Three.js | |
Pixi.js | |
Phaser | |
Babylon.js | |
Matter.js | |
PlayCanvas |
This file contains 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 { useLayoutEffect } from 'react' | |
import { useLocation } from 'react-router-dom' | |
const ScrollToTop = () => { | |
const { pathname } = useLocation() | |
useLayoutEffect(() => { | |
window && window.scrollTo(0, 0) | |
}, [pathname]) |
This file contains 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
JavaScript Library for building User Interfaces | |
React Community | |
https://stackoverflow.com/questions/tagged/reactjs | |
439,112 questions | |
https://twitter.com/reactjs | |
656,8 N Người theo dõi | |
https://github.com/facebook/react |
This file contains 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
npm config set fetch-retry-mintimeout 20000 | |
npm config set fetch-retry-maxtimeout 120000 | |
npm config ls -l |
This file contains 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
1. Install package "@svgr/cli", "@svgr/plugin-jsx" | |
2. Setup scripts build from svg (npm run svgr) | |
"svgr": "svgr --config-file .svgrrc.js -d src/assets/icons -- src/assets/icons" | |
3. Create file .svgrrc.js | |
module.exports = { | |
icon: false, | |
expandProps: true, | |
replaceAttrValues: { 'none': "currentColor" }, |
This file contains 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
<VirtualHost *:80> | |
DocumentRoot /home/web/build/ | |
<Directory"/home/web/build/"> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
Require all granted | |
</Directory> | |
</VirtualHost> |
This file contains 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 { useEffect, useRef } from "react" | |
/* | |
isMounted = useIsMounted() | |
useEffect(() => { | |
if (isMounted.current) { | |
// code... | |
} | |
}, [isMounted]) | |
*/ |
NewerOlder