- Motion One
From creator of Popmotion, Pose and Framer Motion. For React, use Framer Motion.
- Framer Motion
- AutoAnimate
- React Spring
This file contains 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
:root { | |
--color-scale-black: hsl(0, 0%, 3.5%); | |
--color-scale-white: #ffffff; | |
--color-scale-gray-1: hsl(0, 0%, 8.5%); | |
--color-scale-gray-2: hsl(0, 0%, 11.0%); | |
--color-scale-gray-3: hsl(0, 0%, 13.6%); | |
--color-scale-gray-4: hsl(0, 0%, 15.8%); | |
--color-scale-gray-5: hsl(0, 0%, 17.9%); | |
--color-scale-gray-6: hsl(0, 0%, 20.5%); | |
--color-scale-gray-7: hsl(0, 0%, 24.3%); |
This file contains 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 React from "react"; | |
type ReducerWithOptionalAction<S> = (prevState: S, action?: S) => S; | |
type ReducerStateWithOptionalAction<S> = React.ReducerState<ReducerWithOptionalAction<S>>; | |
type DispatchWithOptionalAction<S> = React.Dispatch<S> & React.DispatchWithoutAction; | |
type ReducerValueWithOptionalAction<S> = [ | |
ReducerStateWithOptionalAction<S>, | |
React.DispatchWithOptionalAction<S>, | |
]; | |
This file contains 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 { json, ActionFunction, useActionData, Form } from "remix"; | |
import { z } from "zod"; | |
// This type infer errors from a ZodType, as produced by `flatten()` of a parsed schema. | |
type inferSafeParseErrors<T extends z.ZodType<any, any, any>, U = string> = { | |
formErrors: U[]; | |
fieldErrors: { | |
[P in keyof z.infer<T>]?: U[]; | |
}; | |
}; |
This file contains 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
[profile.release] | |
opt-level = "z" | |
lto = true | |
codegen-units = 1 | |
panic = "abort" |
This file contains 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
function BetterFixedLazyExample({ lazyValue }) { | |
// Initialize with null value. | |
const myRef = useRef(null); | |
useLayoutEffect(() => { | |
console.log(myRef.current); // => HTMLDivElement DOM node | |
}, []); | |
// Make sure the ref setter is not blocked by conditionals. | |
return ( |
This file contains 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 React from 'react'; | |
import { createBrowserHistory } from 'history'; | |
export const historyContext = React.createContext(null); | |
const HistoryContextProvider = historyContext.Provider; | |
// This is initialized at the time the file/module is imported, and not on component mount. | |
const history = createBrowserHistory(); | |
export function History(props) { |
A list of cheap-ish fonts, that doesn't put a dent in my wallet.
NewerOlder