Skip to content

Instantly share code, notes, and snippets.

View naseef0's full-sized avatar
🌸
complicated :)

Naseef naseef0

🌸
complicated :)
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"data": {
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": {
"name": "Mutation"
},
"subscriptionType": null,
import React, { useEffect, useRef } from "react";
import { animated, useSpring } from "react-spring";
// You can use this `calc1 and calc2` method to increase the impact
// of the effect by playing around with the values and units.
const calc1 = (o) => `translateY(${o * 0.1}px)`;
const calc2 = (o) => `translateY(-${o * 0.01}px)`;
const ParallaxBanner = () => {
const ref = useRef();