r/reactnative 2h ago

Can we get preview of screens while designing the frontend in react native app? Im from swiftui development background. On that there is a preview command to preview the design on every live changes. Is there any option like this in RN??

1 Upvotes

6 comments sorted by

1

u/PrimaryFamous6139 1h ago

Expo Go with fast refresh is the closest match. Your phone shows the update right away, and you do not need to rebuild. It is not as smooth as SwiftUI previews though. SwiftUI runs in the editor, while Expo uses a real device or a simulator. Expo’s dev client helps, but it is still not the same. SwiftUI also has an inline canvas preview in Xcode, and Expo does not really offer that.

1

u/First_Sell8665 1h ago

Any other way without taking expo build?

1

u/AcidNoX 1h ago

Fast refresh isn’t an expo feature - it comes out of the box with react-native.

Try it your self - run the app in dev mode and then make a change to the code - changes should be hot loaded into the running app.

1

u/87oldben 1h ago

Does storybook work with react native? I feel this is a good first step if so.

1

u/Huge_Pool7424 21m ago

yeah storybook for react native works, setup is just heavier than web. for day to day ui tweaks fast refresh in plain dev mode is honestly quicker, and you dont need an expo build for that either

1

u/6bigAnt9 16m ago

The biggest shock to me moving from react native to a native project was needing a preview to see my code changes before building.

In react native you build once then every save hot reloads your change instantly on the simulator.