Skip to content

Tag: javascript

How to put overlapping images on html5 canvas?

I want to make a cool visualization where I would overlap lots of semi-transparent images on my canvas. For this, I decided to use context.putImageData() because these images are stored as arrays. The problem is that this method disregards the actual background of the canvas with the already drawn images and …

Pass props with callback from Parent to component

I have this parent App.jsx, with two components <Child1/> and <Child2/> imported. This is Child1.jsx, where I have ‘players’ set locally by this.setState(): And here Child2.jsx, which needs ‘players’ as props, given the fact they are fetched at Child1.jsx. I know I can achi…