Skip to content

Instantly share code, notes, and snippets.

View LishuGupta652's full-sized avatar
🎯
Focusing

Lishu Gupta LishuGupta652

🎯
Focusing
View GitHub Profile
@LishuGupta652
LishuGupta652 / webdev_online_resources.md
Created June 6, 2019 06:49 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@LishuGupta652
LishuGupta652 / useLocalStorage.js
Created April 16, 2020 20:26 — forked from joshuacerbito/useLocalStorage.js
Custom React Hook for handling local storage
import { useState } from 'react';
export default function useLocalStorage(key, initialValue) {
const [item, setInnerValue] = useState(() => {
try {
return window.localStorage.getItem(key)
? JSON.parse(window.localStorage.getItem(key))
: initialValue;
} catch (error) {
return initialValue;
@LishuGupta652
LishuGupta652 / useScroll.js
Created April 16, 2020 20:27 — forked from joshuacerbito/useScroll.js
Custom React hook for listening to scroll events
/**
* useScroll React custom hook
* Usage:
* const { scrollX, scrollY, scrollDirection } = useScroll();
*/
import { useState, useEffect } from "react";
export function useScroll() {
const [lastScrollTop, setLastScrollTop] = useState(0);
import * as React from "react";
import { useScrollData } from "scroll-data-hook";
const Scroll = () => {
const {
scrolling,
time,
speed,
direction,
position,
import React, { useEffect, useState } from "react";
import { useIntersection } from "react-use";
export const IntersectionContext = React.createContext({ inView: true });
export const IntersectionObserver = ({
children,
reset = false // if value set to true - observed element will reappear every time it shows up on the screen
}) => {
const [inView, setInView] = useState(false);
import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import Typewriter from "typewriter-effect";
import { TimelineMax } from "gsap";
//import component
import FixedItems from "./FixedItems";
import { gsap } from "gsap";
import { CSSPlugin } from "gsap/CSSPlugin";
@LishuGupta652
LishuGupta652 / firebase.json
Created August 18, 2020 16:33
Firebase Redirect File REACT
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites" : [{
"source" : "**",
@import url('https://fonts.googleapis.com/css2?family=Oswald&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
:root {
--primary-transition: 0.25s ease-in-out;
--fast-transition: 0.1s ease-in;
}
1: Random human svg : https://avatars.dicebear.com/api/human/<randomstring>.svg
2: unsplash random image: https://unsplash.it/500/500
We couldn’t find that file to show.