react-esm
Version:
React is a JavaScript library for building user interfaces.
19 lines (17 loc) • 391 B
JavaScript
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// an immutable object with a single mutable value
export function createRef() {
const refObject = {
current: null
};
if (__DEV__) {
Object.seal(refObject);
}
return refObject;
}