Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/preactjs/preact
/ StateContainer
Function
StateContainer
test-utils/test/shared/act.test.jsx:38–41 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
36
it(
'should flush pending effects'
, () => {
37
let spy = sinon.spy();
38
function StateContainer() {
39
useEffect(spy);
40
return <div />;
41
}
42
act(() => render(<StateContainer />, scratch));
43
expect(spy).to.be.calledOnce;
44
});
Callers
nothing calls this directly
Calls
3
useEffect
Function · 0.90
useState
Function · 0.90
spy
Function · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…