({ children }: any)
| 340 | }; |
| 341 | |
| 342 | export const MainComponent = ({ children }: any) => { |
| 343 | const [x, setX] = React.useState(2); |
| 344 | const memoXPlusOne = React.useMemo(() => x + 1, [x]); |
| 345 | |
| 346 | return React.createElement( |
| 347 | // @ts-ignore |
| 348 | TestContext.Provider, |
| 349 | { value: { hello: x } }, |
| 350 | React.createElement(LeafComponent, null), |
| 351 | // React.createElement( |
| 352 | // ContainerComponent, |
| 353 | // null, |
| 354 | // React.createElement(LeafComponent, null) |
| 355 | // ), |
| 356 | React.createElement(DualIncrementer, null), |
| 357 | // React.createElement(DualIncrementer, null), |
| 358 | React.createElement(ActionButton, null), |
| 359 | React.createElement(OuterWrapper, null), |
| 360 | React.createElement("div", { innerText: "memo'd x + 1: " + memoXPlusOne }), |
| 361 | React.createElement( |
| 362 | "div", |
| 363 | { |
| 364 | style: "color:blue", |
| 365 | }, |
| 366 | React.createElement("button", { |
| 367 | onclick: () => setX(x + 1), |
| 368 | innerText: "RERENDER EVERYTHING " + x, |
| 369 | style: "color: orange", |
| 370 | }) |
| 371 | ), |
| 372 | |
| 373 | ...children |
| 374 | ); |
| 375 | }; |
| 376 | |
| 377 | export const MegaChild = () => { |
| 378 | console.log("megachild re-render"); |
nothing calls this directly
no outgoing calls
no test coverage detected