From jQuery To TypeScript - [1/3] - Super Mario

Published: 24 March 2021
on channel: Code Review Videos
1,018
7

I recently came across a rather lovely JS and CSS effect called the "Animated Background Gradient" by Mario Klingemann.

Through clever use of mathematics, Mario offers us a way to constantly update the background attribute of a given CSS selector, and this allows the beautiful gradual transition between several colours.

There was only one problem, as far as I was concerned: This pen / code sample uses JQuery, and I wanted to make use of this in a React and TypeScript project.

To me, this seemed like a great opportunity to play with both React and TypeScript, and hopefully learn a few new things along the way.

To follow along, all you need is a React and TypeScript project, which if you don't yet have, you can create in one line:

npx create-react-app lovely-background-tutorial --scripts-version=react-scripts-ts

This makes use of the excellent Create React App TypeScript variant.

https://codereviewvideos.com/course/f...


Watch video From jQuery To TypeScript - [1/3] - Super Mario online without registration, duration hours minute second in high quality. This video was added by user Code Review Videos 24 March 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,018 once and liked it 7 people.