상태가 늘 동기화되는 Dart와 Flutter 앱을 만드세요. MobX가 데이터를 필요한 곳에 자동으로 연결해 주니, 정말 중요한 일에 집중할 수 있습니다.
items = 1작고 읽기 쉬운 Dart 코드.
앱이 커져도 연결은 계속 동작합니다.
상품 페이지, 장바구니 배지, 결제 화면이 모두 같은 상태를 읽습니다. 수량을 한 번만 바꾸면 MobX가 파생 값을 모두 맞춰 줍니다.
final quantity = Observable(1);
final total = Computed(() => quantity.value * 24);
void addItem() => runInAction(() => quantity.value++);
Widget totalLabel() => Observer(builder: (_) => Text('${total.value}'));
실제 Flutter 예제를 실행해 보세요.
실행을 누르면 Flutter 런타임을 불러옵니다.몇 가지 개념만 익히면 어디서나 쓸 수 있습니다.
첫 카운터부터 앱 전체가 공유하는 상태까지.
이름, 장바구니, 컬렉션. observable로 만들면 MobX가 누가 그 값을 쓰는지 추적합니다.
값을 하나만 바꾸거나 여러 개를 한꺼번에 바꾸세요. Reaction은 action이 끝난 뒤의 상태를 봅니다.
합계, 필터링된 목록, 유효성 검사. 값을 어떻게 파생할지만 적으면 MobX가 늘 최신 값으로 유지합니다.
초안을 저장하거나 상태 변화에 대응하세요. 읽고 있는 상태가 바뀌면 부수효과를 실행합니다.
Observer 빌더 안에서 observable을 읽으세요. 의존하는 값이 바뀌면 다시 빌드됩니다.
요청 상태와 실시간 이벤트를 앱의 다른 부분과 같은 반응형 개념으로 관찰합니다.
Dart와 Flutter 커뮤니티의 일부입니다.
개발자들이 남긴 이야기를 들어 보세요.
It's like BLoC, but actually works.

If you haven't seen MobX.dart, check it out. In combination with Provider, it's PFM (Pure Flutter Magic). I use it when I build anything real. #recommended #Flutter

This framework is just awesome. I ported my Flutter app to it and everything feels so much simpler now (even if the porting process has not been easy). I highly recommend it ! 👌

On Professional projects, MobX helps me manage hundreds of forms and thousands of fields with transparency. When working on Generative Art, it helps me create highly configurable widgets without complexity. MobX supports me on all of my projects.

MobX has made managing UI state a breeze. Instead of worrying about how and when we need to update UI, we just run actions and update data like we normally do in Dart and it just works! How MobX does this is pure magic!

MobX feels so robust and leverages the Dart language very well. Brazil's community was previously attached to BLoC. With MobX, they have found a great replacement. Several people here in Brazil are building Flutter apps quickly, thanks to MobX.

MobX's concepts of Observables, Actions and Reactions make it intuitive to figure out how to model the state of an application. I would highly recommend it as a solution for managing the application's state.

We at GeekyAnts have used MobX.dart in many Flutter projects. We have chosen it as the default state-management library for the internal frameworks built for Flutter.

지난 후원사에도 감사드립니다: Netlify · Algolia · Wunderdog · Publicis Sapient
상태 동기화는 MobX에 맡기세요.
MobX 시작하기