Тёмный

Avoid using StatefullWidget! 

Codrut Erdei
Подписаться 4,3 тыс.
Просмотров 8 тыс.
50% 1

Lifting state up and state: • State Management! Flut...
In this video, I'm addressing why I think using StatefulWidget is not adequate for production applications or for any big Flutter project.

Опубликовано:

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@DraskoSaric
@DraskoSaric Год назад
Now I completely agree with you. 😀 You summarized it in very simple and understandable way. Bottom line: avoid to use them as much as possible. 😉
@_undecided
@_undecided Год назад
People not really understand StatefulWidget widget. StatefulWidget have more important things as set state. To change state you use ValueNotifier or any other state management. StatefulWidget used to check widgets life circle as on dispose, init state and the rest. All important elements in the Flutter is based on the StatefulWidget.
@codruterdei
@codruterdei Год назад
I actually said that in the video 😊
@RandalLSchwartz
@RandalLSchwartz Год назад
StatefulWidgets are just fine when you need ephemeral state for a widget that has a lifetime coincident with the widget and survives between builds. Yes, for any state that is shared beyond this scope or lifetime, you'll reach for a state management solution (my preference is Riverpod). But it seems like you're throwing the baby out with the bathwater in this video. The proper stance is a bit more tolerance.
@johnjackson6262
@johnjackson6262 Год назад
Except for text controllers / other controllers, custom widgets you make, when you need a simple callback not tied to bloc so you can reuse it, when your passing copies of bloc as a parameter so you don't have app wide scope of the bloc...
@ymts_vladyslav3707
@ymts_vladyslav3707 3 месяца назад
I have seen people exactly with the same problem. They were studying their employees to use blocs as a state without stateful widgets, even including text controllers, scaffold keys and etc...
@nathanielgreen8776
@nathanielgreen8776 Год назад
Just a note: Your current thumbnail says "StatelessWidget sucks" but this video is about StatefulWidget
@codruterdei
@codruterdei Год назад
OMG :O
@maddyIncubus
@maddyIncubus 11 месяцев назад
Most of the flutter related debates seem to have already taken place in the reactJs community I suppose. Using state in component may not be a useful as states need to be lifted and hence Redux, etc. Have seen similar vids where all the debates seem like deja vu :) Maybe someone has to do a vid of the similarity between React and Flutter, from a comcepts point of view (even build() is similar to render() ).
@twitchpop4140
@twitchpop4140 Год назад
It would be interesting to watch about navigation tools)
@codruterdei
@codruterdei Год назад
Like go_router?
@twitchpop4140
@twitchpop4140 Год назад
@@codruterdei Yep, there are more options.
Далее
State Management! Flutter What's next? #1
23:01
Просмотров 8 тыс.
Stateless vs Stateful | Flutter Example
6:45
Просмотров 18 тыс.
iPhone 16 - презентация Apple 2024
01:00
Просмотров 55 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 557 тыс.
Flutter State Management - The Grand Tour
14:07
Просмотров 241 тыс.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
GetX vs Riverpod | Which is better with Flutter❓
16:20
Flutter Basic Training - 12 Minute Bootcamp
12:09
Просмотров 897 тыс.
When RESTful architecture isn't enough...
21:02
Просмотров 275 тыс.
iPhone 16 - презентация Apple 2024
01:00
Просмотров 55 тыс.