lxsmnsyc / solid-labels

Simple, reactive labels for SolidJS
MIT License
246 stars 8 forks source link

Multiple evaluation is unexpected #22

Open jekor opened 4 months ago

jekor commented 4 months ago

It seems that the right-hand side of assignments to signals may be evaluated more than once:

let s = $signal();
// response: Response
s = await response.text();

Failed to execute 'text' on 'Response': body stream already read

Workaround is to first assign to a normal variable:

let s = $signal();
// response: Response
const text = await response.text()
s = text;