fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
28.12k stars 3.45k forks source link

[Feature]: Add plain React + Vite example in CodeSandbox #9705

Open Mikilll94 opened 4 months ago

Mikilll94 commented 4 months ago

CheckList

Description

Add plain React + Vite example in CodeSandbox. Not everyone uses Next.js.

Current State

Currently there is only Next.js example in CodeSandbox.

Additional Context

No response

ShaMan123 commented 4 months ago

I am not a vite dev Are you willing to PR? I did a vue example not long ago Also look at #9700 for the react hooks

ShaMan123 commented 4 months ago

Isn't the vue demo enough?

asturur commented 4 months ago

Isn't vitejs just a simple plain framework to start a react application, a sort of modern create-react-app ?

i used it recently is just plain react with nothing more ( configured eslint, typescript and css yes )

Mikilll94 commented 4 months ago

Isn't vitejs just a simple plain framework to start a react application, a sort of modern create-react-app ?

i used it recently is just plain react with nothing more ( configured eslint, typescript and css yes )

yeah, that's true. Create-react-app is no longer maintained and recommended for developing React. Vite is the most popular and sensible for choice for starting react project now.

rk9155 commented 4 months ago

use fabric version "6.0.0-beta19" it is in beta but works well with vite no extra setup needed just added it and start trying basic components from docs. Reason: Current fabric stable version 5.3.1 won't work with esm6 module support.

Shivamc489 commented 2 months ago

I have been using this package for my react + vite app see if this might help you as well https://www.npmjs.com/package/fabricjs-react-improve