Avoid using StatefullWidget!

  Рет қаралды 7,759

Codrut Erdei

Codrut Erdei

Жыл бұрын

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.

Пікірлер: 14
@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.
@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.
@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...
@maddyIncubus
@maddyIncubus
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)
@nathanielgreen8776
@nathanielgreen8776 Жыл бұрын
Just a note: Your current thumbnail says "StatelessWidget sucks" but this video is about StatefulWidget
Flutter State Management - The Grand Tour
14:07
Fireship
Рет қаралды 239 М.
State Management! Flutter What's next? #1
23:01
Codrut Erdei
Рет қаралды 7 М.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 12 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
Stateless vs Stateful | Flutter Example
6:45
Learn Flutter with Me
Рет қаралды 18 М.
Answering Flutter interview questions until you get hired!
10:34
Codrut Erdei
Рет қаралды 3,9 М.
Kotlin Multiplatform vs Flutter: Which should we use?
4:42
Kei Fujikawa
Рет қаралды 18 М.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter
Рет қаралды 448 М.
Riverpod Simplified | Easy State Management
14:17
Tadas Petra
Рет қаралды 43 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 560 М.
Best State Management for Flutter | Flutter State Management
8:18
AI with Flutter
Рет қаралды 8 М.
Flutter MobX Tutorial - Transparent & Reactive State Management?
39:14
Why am I switching to Flutter in 2024
7:01
Andrei Lupsa
Рет қаралды 64 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 57 М.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
Бискас
Рет қаралды 5 МЛН