I hereby claim:
- I am egor-xyz on github.
- I am egor_xyz (https://keybase.io/egor_xyz) on keybase.
- I have a public key ASBa0wjfVWsJlhtuoAKgWqQGmsWigZ7QxtJSL13j_9t2uAo
To claim this, I am signing this object:
type Providers = [ComponentType<any>, ComponentProps<any>?][]; | |
const combineProviders = (providers: Providers): FC => providers.reduce( | |
(AccumulatedProviders, [Provider, props = {}]) => ({ children }) => ( | |
<AccumulatedProviders> | |
<Provider {...props}> | |
<>{children}</> | |
</Provider> | |
</AccumulatedProviders> | |
), |
import { useCallback, useState } from "react"; | |
import { SmallModal } from "./components/SmallModal"; | |
export const AnotherComponent = () => { | |
// same code again | |
const [isOpen, setIsOpen] = useState(false); | |
// same code again | |
const toggleOpen = useCallback(() => { | |
setIsOpen((isOpen) => !isOpen); |
I hereby claim:
To claim this, I am signing this object: