April 13, 2023
Using Three.js with React
Anyone who has had a glance at Web 3D technologies has definitely heard about Three.js. Three.js is a tool that conveniently provides all the power of WebGL, so your 3D scene not only looks good, but is also written neatly and readable for every developer. As you know, 3D content is rendered in WebGL, while the context is provided by a canvas DOM element. WebGL context has an empirical API, while one of the most popular JS UI libraries, React, propagates a functional, declarative approach. Therefore, you may wonder, can I work with WebGL declaratively, too? Spoiler - you shouldn’t!