0.0.15 • Published 2 years ago
compare-props v0.0.15
Checking if props change with React.memo in React components. Test Data: link
Usage
import React from "react"
import { compareProps } from "compare-props"
type DemoProps = {
name: string,
}
export const Demo: React.FunctionComponent<DemoProps> = React.memo(
({ name }: DemoProps) => {
return <div>Title: {name}</div>
},
compareProps
)