This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("drag handlers aren't frozen at drag session start", async () => { | |
let count = 0 | |
const onDragEnd = deferred() | |
const Component = () => { | |
const [increment, setIncrement] = useState(1) | |
return ( | |
<MockDrag> | |
<motion.div | |
drag | |
onDragStart={() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import sync from "framesync" | |
import { MotionPlugins } from "../../motion/context/MotionPluginContext" | |
import { act } from "react-dom/test-utils" | |
import { fireEvent } from "@testing-library/dom" | |
export type Point = { | |
x: number | |
y: number | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Component = () => { | |
const frameCount = useRef(0) | |
const prevValues = useRef() | |
return <motion.div transformValues={values => { | |
frameCount.current++ | |
const valuesToReturn = isEven(frameCount.current) ? prevValues.current : values | |
prevValues.current = values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi [recruiter's name], | |
Thanks for getting in touch. Sorry, but I'm not open to roles at Facebook. | |
Your company's current stance on political advertising is a conscious choice that's dangerously stoking divisions in society in the name of profit. | |
Also, while I understand the legal framework that allows them to do so, I disagree with massive profit-making American companies like Facebook coming over here and structuring themselves in a way that allows them to avoid local taxation. These companies then underpay European developers in relation to their west coast counterparts. Given our government's aptitude for taxing salaried individuals over corporations, this is another two methods your company uses to withhold the profits we generate for you. | |
Please exclude me from your searches until your company discovers its moral compass | |
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sync, { cancelSync } from "framesync"; | |
import { useEffect } from "react"; | |
/** | |
The code inside useAnimationLoop is guaranteed to run once a frame | |
before Framer Motion/Popmotion/Pose renders | |
useAnimationLoop(({ delta, timestamp }) => { | |
// do stuff | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h = require('virtual-dom/h'); | |
var diff = require('virtual-dom/diff'); | |
var patch = require('virtual-dom/patch'); | |
var createElement = require('virtual-dom/create-element'); | |
var redshift = require('redshift'); | |
var renderAction = redshift.newAction(); | |
// 1: Create a function that declares what the DOM should look like | |
function render(count) { | |
return h('div', { |
NewerOlder