ceddlyburge / react-figma-miro-canvas-part-3

Companion code to "How to Create a Figma / Miro Style Canvas with React and TypeScript"
https://www.freecodecamp.org/news/how-to-create-a-figma-miro-style-canvas-with-react-and-typescript/
2 stars 2 forks source link

Noice! #3

Closed iaverypadberg closed 3 months ago

iaverypadberg commented 3 months ago

Thanks for writing and publishing this code- super well done and performant. I was hacking around with the react-rnd libary and had little success. (˶ᵔ ᵕ ᵔ˶)

ceddlyburge commented 3 months ago

Awesome, glad you like it!

This code is as simple as possible, to make the blog post easy to understand, but there are some further performance things you can do. The easy ones are memo and useCallback and stuff like that, and we use some weird css in production to avoid react re renders, and I'm sure there are more things you could do if you dig deeper and need the performance. We didn't need to though.

Anyway, there is some discussion of performance in #2 if you ever need it.

Cheers, Cedd