Skip to content

Instantly share code, notes, and snippets.

@shcoderAlex
shcoderAlex / client-docker-composer.yml
Created September 8, 2016 10:01
Core-docker-system and client-docker
version: '2'
services:
php:
image: shcoder/alpine-php7-fpm-composer
volumes_from:
- app
environment:
- SERVICE_NAME=app_name
nginx:
{
"us-east-1": "A1,CO,A2,AG,AI,AN,AW,BB,BM,BS,BZ,CR,CU,DM,DO,GD,GP,GT,HN,HT,JM,KN,KY,LC,MQ,MS,NI,O1,PA,PM,PR,SV,TC,TT,US,VC,VG,VI",
"us-east-2": "CA",
"us-west-1": "MX,PF,PN",
"ap-northeast-1": "FM,GU,JP,MH,MP,PW,UM",
"ap-northeast-2": "KP,KR,TW",
"ap-southeast-1": "*",
"ap-south-1": "AF,BD,BH,BI,BT,CD,DJ,ER,ET,IN,IO,IQ,IR,KE,KG,KM,KW,LK,MG,MU,MV,MW,MZ,NP,OM,PK,QA,RE,RW,SA,SC,SO,TJ,TM,TZ,UG,UZ,YE,YT",
"ap-southeast-2": "AQ,AS,AU,CK,FJ,HM,KI,NC,NF,NR,NU,NZ,PG,SB,TK,TO,TV,VU,WF,WS",
"sa-east-1": "AR,BO,BR,BV,CL,EC,FK,GF,GS,GY,PE,PY,SH,SR,UY,VE",

React:

  1. What can you say about the high order component(HOC)? - https://reactjs.org/docs/higher-order-components.html
  2. What is the difference between React.PureComponent and React.Component? - https://stackoverflow.com/questions/41340697/react-component-vs-react-purecomponent/43936258
  3. Why we shouldn't use inline arrow functions in component props? Using arrow functions or binding in react component is a bad practice that hurts performance, because the function is recreated on each render. Whenever a function is created, the previous function is garbage collected. Rerendering many elements might create jank in animations. Using an inline arrow function will cause PureComponents, and components that use shallowCompare in the shouldComponentUpdate method to rerender anyway. Since the arrow function prop is recreated each time, the shallow compare will identify it as a change to a prop, and the component will rerender.
  4. What methods of lifecycle do you know? Call them in the correct order. -