texts function

Module @runic-artifex/views-effect in @runic-artifex/views-effect 0.23.0

function texts(value: TextReference | FieldError | string | null | undefined, fallback?: string): Stream.Stream<string>;

A text reference that a ViewModel produced, in the window's language (resolveText): its text now, then its text after each language switch. A string is its own text; null and undefined are fallback. A field's FieldError is the application's text for it (configureFieldErrorText), or its English message.

yield* Effect.forkScoped(Stream.runForEach(texts(state.status), text => Effect.sync(() => { status.textContent = text; })));