import { computed, pattern } from "commonfabric"; // FIXTURE: pattern-vs-computed-logical-and // Verifies: top-level pattern JSX logical roots lower structurally, but computed-owned logical roots stay authored //
{foo && name}
in a pattern body → __cfHelpers.when(...) //
{computed(() => foo && bar)}
keeps the authored && inside the computed callback export const PatternLogicalAnd = pattern<{ foo: boolean; user: { name: string }; }>(({ foo, user: { name } }) => (
{foo && name}
)); export const ComputedLogicalAnd = pattern<{ foo: boolean; bar: string }>(( { foo, bar }, ) => (
{computed(() => foo && bar)}
));