Skip to content

Instantly share code, notes, and snippets.

@chrisdhanaraj
Created September 21, 2022 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdhanaraj/a7adb83c8eb534ccdf1d2ff6cc091f6d to your computer and use it in GitHub Desktop.
Save chrisdhanaraj/a7adb83c8eb534ccdf1d2ff6cc091f6d to your computer and use it in GitHub Desktop.
Example
const TableWrapper = ({
someProperty,
otherProperty
}) => {
const [data, loading] = useQuery({
variables: {
someProperty,
otherProperty
}
});
if (loading) {
return <Loader />
}
return <Table someProperty={someProperty} otherProperty={otherProperty} data={data} />
}
const Table = ({
somePropeerty,
otherProperty,
data
}) => {
const computed = React.useMemo(() => {}, [data, someProperty]);
// ...othertThings
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment