Basic Usage

Grunfeld provides two main usage patterns: simple alerts and dialogs that receive user responses. Each pattern is implemented using different overloads.

Alert Dialogs#

Using a factory function without parameters creates a simple alert. This approach returns void and executes synchronously.

Confirmation Dialogs#

Confirmation dialogs that wait for user selection receive the removeWith function as a parameter. Call this function to close the dialog and return a result value.

Input Dialogs#

Dialogs that receive data input from users follow the same pattern. Create an input component and pass the value through removeWith.

Basic Usage - Creating Dialogs with Grunfeld | ilokesto - React Library Collection