Menu

Post image 1
Post image 2
1 / 2
0

MVC, MVP, MVVM in React Native: what survives the trip

DEV Community·Amanda Gama·21 days ago
#Abxf1IQ3
Reading 0:00
15s threshold

MVC, MVP, MVVM all come from worlds React Native doesn't fully have. Half of each pattern dies on import. The other half is what most React Native code is already doing under different names. This post is about which half is which. What React Native is missing Before mapping a pattern onto React Native, notice what isn't there. No swappable view. In Cocoa or WPF, the View is an object you can replace, subclass, or wire to a different controller. In React Native the View is a function call result. There's nothing to swap. The closest equivalent is "render a different component," which isn't the same operation. No two-way binding. WPF, Knockout, early Angular: the View binds to a property; updating either side updates the other. React went the other way on purpose. State flows down, events flow up, and "binding" is a manual value plus onChange . MVVM assumes the binding does work; in React Native, you do that work. No framework-managed event loop.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More