Open
Description
Just added this to my react project, but I am getting this error:
Surface uses the legacy childContextTypes API which was removed in React 19. Use React.createContext()
This is my code, essentially it's just the example code
import { Shaders, Node, GLSL } from "gl-react";
import { Surface } from "gl-react-dom";
const shaders = Shaders.create({
helloBlue: {
frag: GLSL`
precision highp float;
varying vec2 uv;
uniform float blue;
void main() {
gl_FragColor = vec4(uv.x, uv.y, blue, 1.0);
}`
}
});
const GlVfx = () => {
return (
<Surface width={300} height={300}>
{/*
// @ts-expect-error uniforms requires string index not number */}
<Node shader={shaders.helloBlue} uniforms={0.5} />
</Surface>
);
};
export default GlVfx;
"react": "^19.0.0",
"react-dom": "^19.0.0",
Metadata
Metadata
Assignees
Labels
No labels