У нас вы можете посмотреть бесплатно Supercharge your Flask templates by switching from jQuery to React или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
In this video I show you how you can add interactive behaviors to your Flask/Jinja templates, but instead of using jQuery or similar solutions, I use standard React patterns, without switching to a Single-Page app. Code repository: https://github.com/miguelgrinberg/fla... Chapters: 00:00 Introduction 00:58 Demonstration 02:09 Project structure 02:39 Flask logic 03:11 HTML template 04:50 Set up Python environment 05:21 Running the Flask application 05:50 Form processing logic 07:29 Adding Preact to the Jinja template 10:23 Rendering a simple component 12:36 Create an input field as a React component 14:07 Add increment and decrement buttons to the field 14:25 Add state to the component 15:10 Add button click handlers 16:27 Enabled and disabled states for the buttons 17:50 Testing the Flask form submission 18:36 Concluding remarks