Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Base64Png Editor Initial Render
export const Base64PngEditor = React.forwardRef<EditorApi, Props>((props, forwardedRef) => {
// ...
return (
<div className={"base64png-editor--viewport"}>
<img
ref={imageRef}
className={"base64png-editor--image"}
src={`data:image/png;base64,${originalContent}`}
alt={"Original"}
/>
<canvas
ref={canvasRef}
className={"base64png-editor--canvas"}
/>
</div>
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment