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
| // example: https://stackblitz.com/edit/react-ts-hesbky?file=use-reducer.ts | |
| // inspired by https://github.com/zeit/swr/pull/186/files | |
| import {useState, useRef} from "react"; | |
| type StateDependencies<T> = { | |
| [K in keyof T]?: boolean; | |
| }; | |
| function equals(compareA, compareB) { |
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
| type Key = string | number | symbol | |
| const PathSymbol = Symbol('path'); | |
| function pathProxy(path: Key[] = []) { | |
| return new Proxy({ | |
| get [PathSymbol]() { | |
| return path; | |
| }, | |
| }, { |
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
| :root { | |
| --blitz-color-content-primary: #000000; | |
| } | |
| $blitz-color-content-primary: var(--blitz-color-content-primary, #000000); | |
| $blitz-color-content-secondary: #000000; | |
| .test { | |
| background-color: $blitz-color-content-primary; | |
| background-color: $blitz-color-content-secondary; |
OlderNewer