![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@gush/candybar
Advanced tools
A simple <canvas>
rendering engine and collection of classes and utils. And by "engine" I mean about as advanced as a broken scooter 🛴
🚨 This is an alpha release
Really, don't use this thing for anything yet.
Install it, duh.
yarn add @gush/candybar
Then create a canvas.
import { Canvas } from '@gush/candybar';
const canvas = new Canvas({
canvas: document.getElementById('canvas'),
});
This will create a beautiful blank canvas. 🙌🏻
Canvas classes can be created with a few options:
canvas
container
hasPointer
entities
new Canvas({
// This is the required HTML element that the Canvas class will render to.
canvas: document.getElementById('canvas'),
// Container is the element that the canvas should be fit within,
// if this is not provided it's assumed this is a full screen canvas
container: document.getElementById('container'),
// Indicates if the canvas should capture mouse/touch pointer events.
hasPointer: true,
// Entities are objects that will be renedered by the Canvas engine.
entities: [...things],
});
The engine will loop through each entity and call a couple methods to "render" the entity. First a draw()
method is called where you should do any drawing using the HTML canvas API. Then an update()
method is called which should be used to update any properties based on the engine.
class MyThing {
constructor() {
this.x = 0;
this.y = 0;
}
draw = ({ ctx }) => {
// draw with canvas API through the provided context
ctx.fillRect(this.x, this.y, 100, 100);
};
update = ({ pointer }) => {
// update the rect position based on pointer position
const { x, y } = this.pointer.position;
this.x = x;
this.y = y;
};
}
FAQs
The npm package @gush/candybar receives a total of 0 weekly downloads. As such, @gush/candybar popularity was classified as not popular.
We found that @gush/candybar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.