Home

MVI

MVI stands for Model-View-Intent, a user interface architectural pattern that emphasizes a unidirectional data flow. It structures UI logic around a single source of truth and a predictable loop from user interaction to rendered state.

In MVI, the View renders a Model, which is an immutable representation of the current UI state.

Intents can also be referred to as Actions or Events in some implementations. The transformation from Intent

Benefits of MVI include improved testability, easier reasoning about UI state, deterministic rendering, and straightforward time-travel

MVI has been used in mobile and web development, particularly in environments that support reactive programming

The
View
also
emits
Intents,
which
represent
user
actions,
events,
or
lifecycle
cues.
These
Intents
are
fed
into
a
central
loop
that
applies
them
to
the
current
Model
to
produce
a
new
Model.
The
View
then
renders
the
updated
Model.
The
Model
serves
as
the
single
source
of
truth
for
the
UI,
and
rendering
is
driven
entirely
by
Model
updates.
to
a
new
Model
is
often
handled
by
a
component
such
as
a
Processor,
Reducer,
or
Presenter,
commonly
using
reactive
streams
or
asynchronous
pipelines.
MVI
is
related
to
but
distinct
from
patterns
like
Model-View-Controller
(MVC),
Model-View-Presenter
(MVP),
and
Model-View-ViewModel
(MVVM),
sharing
with
Elm
and
Redux
the
emphasis
on
unidirectional
data
flow
and
explicit
state
transitions.
debugging.
Criticisms
include
potential
boilerplate,
a
steeper
learning
curve,
and
complexity
that
may
not
be
warranted
for
simpler
applications.
with
languages
and
frameworks
such
as
Kotlin,
JavaScript,
RxJava,
Coroutines,
or
Flow.
It
is
chosen
when
clear
state
management
and
predictable
UI
behavior
are
priorities.