I hereby claim:
- I am riquito on github.
- I am riquito (https://keybase.io/riquito) on keybase.
- I have a public key whose fingerprint is 3DBC 89B5 5FBE 7FFC 2251 1700 7DDD E7C6 2598 3A25
To claim this, I am signing this object:
// Copyright (c) 2023 Riccardo Attilio Galli. All rights reserved. | |
// This work is licensed under the terms of the MIT license. | |
// For a copy, see <https://opensource.org/licenses/MIT>. | |
// So, ideally yarn workspaces list --json -R --since=HEAD~ | |
// would give use what we want | |
// We want a list of packages (and perhaps their locations) that | |
// have been meaningfully modified. |
/** | |
* Create an higher order component that receives props from a context consumer. | |
* | |
* // e.g. Create your with<SomeConsumer> function | |
* // const withDispatch = makeWithConsumer(DispatchContext.consumer, 'Dispatch') | |
* | |
* // e.g. pass the consumer props as they are | |
* const ButtonConnected = withDispatch(Button) | |
* |
import React, { Component, Fragment } from 'react'; | |
export const withShouldComponentUpdate = (WrappedComponent, func) => { | |
class WithShouldComponentUpdate extends Component { | |
displayName = `WithShouldComponentUpdate(${getDisplayName( | |
WrappedComponent, | |
)})`; | |
shouldComponentUpdate = (nextProps, nextState) => | |
func.call(this, nextProps, nextState); | |
render = () => ( |
I hereby claim:
To claim this, I am signing this object: