Comments (4)
Yes, I think everything should work perfectly. I checked the examples on version 18 below by following the links. Did you run into any problems?
https://codesandbox.io/s/fireworks-cl-react-canvas-confetti-forked-tkj37h
https://codesandbox.io/s/school-pride-fn-react-canvas-confetti-forked-v89wrb
from react-canvas-confetti.
This warning comes up in the console log.
Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
from react-canvas-confetti.
This is not a library issue. If you are going to use react 18 you need to use the new createRoot API. Just replace your code
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
with that
const container = document.getElementById("root");
const root = createRoot(container);
root.render(<App />);
from react-canvas-confetti.
I thought it was the library using the old api. Thanks!
from react-canvas-confetti.
Related Issues (11)
- Update to v1.3.3 HOT 1
- Snow effect does not take into account array of confetti colours
- New star shape breaks Typescript HOT 2
- Preset style throw errors on compilation time HOT 3
- Changelog Support HOT 3
- An example with Functional Component in React HOT 2
- Set the confetti work on timer
- question: react native support? HOT 1
- How to draw custom confetti particles using canvas? HOT 2
- Poor performance on Firefox for Android HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-canvas-confetti.