Skip to content

Release v22.155.0

Choose a tag to compare

@github-actions github-actions released this 01 Nov 12:28
f1a3b21

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; ApplicationContext exposes 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> renders data-cratis-module, data-cratis-feature and data-cratis-slice on slice boundaries so a DOM element can be traced to its slice; nothing extra is rendered when it is off. (#3604)
  • Dialogs opened with useDialog keep the slice scope they were opened from, can declare their own with useDialog(Component, { slice }), are tracked as the focused location while open, and expose their location through useDialogSliceLocation(). (#3605)