MCPcopy Create free account
hub / github.com/adobe/react-spectrum / createState

Function createState

packages/@react-spectrum/s2/src/Image.tsx:144–151  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

142 | {type: 'error'};
143
144function createState(src: string): State {
145 return {
146 state: 'loading',
147 src,
148 startTime: Date.now(),
149 loadTime: 0
150 };
151}
152
153function reducer(state: State, action: Action): State {
154 switch (action.type) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected