-
Beta Was this translation helpful? Give feedback.
Answered by
wojtekmaj
Jun 8, 2022
Replies: 1 comment 1 reply
-
You can use it in an object passed as Please note: You should memoize objects passed to const file = {
data: // <Binary data here >
};
function Test() {
return (
<Document file={file}>
{/* … */}
</Document>
);
} function Test() {
const file = useMemo(() => ({
data: // <Binary data here >
}), []);
return (
<Document file={file}>
{/* … */}
</Document>
);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wojtekmaj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use it in an object passed as
file
prop.Please note: You should memoize objects passed to
file
prop or ensure they aren't changed with every render.