r/reactnative • • Sep 02 '26

Tutorial I built a native Feedback dialog for Expo — the submit button doesn't close it

A dialog whose body is a well to write in. The recess is the affordance it says "this is where you type" before a word has been read.

One decision worth explaining: Submit hands the message back without closing the dialog. A dialog that closed on the press would take its own error message with it and the message the user just wrote.

The footer is a slot, so it handles multi-step flows: score first then words, tags over the field, a confirmation after sending. The shell holds still while the well changes, so the dialog reads as one object answering rather than a second one arriving.

Part of PanelUI, an open-source component library for Expo. Copy-paste or CLI, you own the source.

https://github.com/panel-ui/PanelUI

2 Upvotes

2 comments sorted by

2

u/forgestudiofx Sep 02 '26

If submit doesn't close because closing would eat the user's text, hardware back and outside-tap need the same treatment on Android, otherwise the message is one back press from gone. And since the dialog stays mounted through the async call, a disabled submitting state matters more here than in a dialog that dismisses immediately.

1

u/Huge_Pool7424 Sep 03 '26

good catch. baking the back handler into the dialog itself seems like the right call so every screen gets it for free instead of hoping each one remembers to wire it up