Skip to content

Instantly share code, notes, and snippets.

View Felix-Indoing's full-sized avatar

Felix-Indoing

View GitHub Profile
@rimatla
rimatla / TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Last active July 16, 2023 11:24
Create React App + TypeScript Linting with TSLint and Prettier setup on VSCode

Ps: The current setup was done on 01-04-19

Project Dependency Versions at the time 👇

  "react": "^16.7.0",
  "react-dom": "^16.7.0",
  "react-scripts": "2.1.3",
  "typescript": "^3.2.2"
  "tslint": "^5.12.0",
  "tslint-config-prettier": "^1.17.0",
@franky47
franky47 / use100vh.js
Created January 11, 2020 07:44
React hook to fix the 100vh issue on mobile Chrome and Safari
import React from 'react';
import { useWindowSize } from 'react-use';
// 100vh is broken on mobile (Chrome, Safari):
// https://chanind.github.io/javascript/2019/09/28/avoid-100vh-on-mobile-web.html
export default function use100vh() {
const ref = React.useRef();
const { height } = useWindowSize();