Skip to content

Instantly share code, notes, and snippets.

Konstantin koss-lebedev

Block or report user

Report or block koss-lebedev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View KanyeQuote-with-cache.tsx
import * as React from "react"
import { Quote } from "./canvas"
export function KanyeQuote() {
const [quote, setQuote] = React.useState("")
React.useEffect(() => {
// load quote from local storage if it's there, fetch from API otherwise
if (localStorage.getItem("quote")) {
setQuote(localStorage.getItem("quote"))
View framer-motion-eight.tsx
const container: Variants = {
active: {
background: "#ff00b1",
transition: {
staggerChildren: 0.5,
when: "beforeChildren"
}
},
disabled: {
background: "#0D00FF"
View framer-motion-seven.tsx
const container: Variants = {
active: {
background: "#ff00b1",
transition: {
staggerChildren: 0.5
}
},
disabled: {
background: "#0D00FF"
}
View framer-motion-six.tsx
const Six = () => {
const container: Variants = {
active: {
background: "#ff00b1",
},
disabled: {
background: "#0D00FF"
}
};
View framer-motion-five.tsx
const Five = () => {
const container: Variants = {
active: {
background: "#ff00b1"
},
disabled: {
background: "#0D00FF"
}
};
View framer-motion-four.tsx
const Four = () => {
const [active, setActive] = React.useState(false);
const rectangle: Variants = {
active: { background: "#ff00b1", rotate: 90 },
disabled: { background: "#0D00FF", rotate: 0 }
};
return (
<motion.div
View framer-motion-three.tsx
const Three = () => {
const [active, setActive] = React.useState(false);
return (
<motion.div
className="rectangle"
animate={
active
? { background: "#ff00b1", rotate: 90 }
: { background: "#0D00FF", rotate: 0 }
View framer-motion-two.tsx
const Two = () => (
<motion.div
className="rectangle"
initial={{
opacity: 0,
y: 50
}}
animate={{
opacity: 1,
y: 0
View framer-motion-one.tsx
import { motion } from "framer-motion";
const One = () => (
<motion.div
className="rectangle"
animate={{
opacity: 0.5,
background: "#ff00b1"
}}
/>
View rematch-custom-hook.tsx
import React, { useEffect, FC } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import UserList from '../../components/UserList'
import { RootState, RootDispatch } from '../../store'
const useRematchDispatch = <D extends {}, MD>(selector: (dispatch: D) => MD) => {
const dispatch = useDispatch<D>()
return selector(dispatch)
}
You can’t perform that action at this time.