mirror of
https://github.com/facebook/react.git
synced 2026-02-26 04:04:59 +00:00
15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
// @debug
|
|
function component(a, b) {
|
|
let z = { a };
|
|
let y = b;
|
|
let x = function () {
|
|
if (y) {
|
|
// we don't know for sure this mutates, so we should assume
|
|
// that there is no mutation so long as `x` isn't called
|
|
// during render
|
|
maybeMutate(z);
|
|
}
|
|
};
|
|
return x;
|
|
}
|