MCPcopy
hub / github.com/BuilderIO/mitosis / updateStateCode

Function updateStateCode

packages/core/src/generators/solid/state/helpers.ts:115–128  ·  view source on GitHub ↗
({
  options,
  component,
  updateSetters = true,
}: {
  options: ToSolidOptions;
  component: MitosisComponent;
  updateSetters?: boolean;
})

Source from the content-addressed store, hash-verified

113 });
114
115export const updateStateCode = ({
116 options,
117 component,
118 updateSetters = true,
119}: {
120 options: ToSolidOptions;
121 component: MitosisComponent;
122 updateSetters?: boolean;
123}) =>
124 flow(
125 updateSetters ? updateStateSettersInCode({ options, component }) : identity,
126 updateStateGettersInCode(options, component),
127 (x) => x.trim(),
128 );

Callers 4

componentToSolidFunction · 0.90
getStoreCodeFunction · 0.90
stateUpdaterFunction · 0.90
processSignalStateValueFunction · 0.90

Calls 2

updateStateGettersInCodeFunction · 0.85
updateStateSettersInCodeFunction · 0.70

Tested by

no test coverage detected