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

Опубликовано: 24 Март 2021
на канале: 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...


Смотрите видео From jQuery To TypeScript - [1/3] - Super Mario онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Review Videos 24 Март 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,018 раз и оно понравилось 7 людям.