Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix-Indoing

View GitHub Profile
@franky47
franky47 / use100vh.js
Created Jan 11, 2020
React hook to fix the 100vh issue on mobile Chrome and Safari
View use100vh.js
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();
@rimatla
rimatla / TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Last active Oct 22, 2022
Create React App + TypeScript Linting with TSLint and Prettier setup on VSCode
View TSLInt-Prettier-CreateReactApp-TypeScript-setup.md

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",