Repository navigation
Release v22.155.0
Running applications can now ask what the user is looking at — the focused module, feature and slice, the slices on screen, the current screen and the open dialogs — from anywhere under <Arc>.
Added
useApplicationContext()returns a snapshot of the focused slice location, every active slice, the current screen, the open dialogs and host-contributed values;ApplicationContextexposes the same as an external store (subscribe/getSnapshot) for code outside React rendering. See Application context. (#3604)useContributeApplicationContext()and<ApplicationContextContributor>let a host or router supply the current screen and its own values. (#3604)<Arc sliceMarkers>rendersdata-cratis-module,data-cratis-featureanddata-cratis-sliceon slice boundaries so a DOM element can be traced to its slice; nothing extra is rendered when it is off. (#3604)- Dialogs opened with
useDialogkeep the slice scope they were opened from, can declare their own withuseDialog(Component, { slice }), are tracked as the focused location while open, and expose their location throughuseDialogSliceLocation(). (#3605)