Buckets:
| ; | |
| Object.defineProperty(exports, "__esModule", { | |
| value: true | |
| }); | |
| exports.default = setRef; | |
| /** | |
| * TODO v5: consider making it private | |
| * | |
| * passes {value} to {ref} | |
| * | |
| * WARNING: Be sure to only call this inside a callback that is passed as a ref. | |
| * Otherwise, make sure to cleanup the previous {ref} if it changes. See | |
| * https://github.com/mui/material-ui/issues/13539 | |
| * | |
| * Useful if you want to expose the ref of an inner component to the public API | |
| * while still using it inside the component. | |
| * @param ref A ref callback or ref object. If anything falsy, this is a no-op. | |
| */ | |
| function setRef(ref, value) { | |
| if (typeof ref === 'function') { | |
| ref(value); | |
| } else if (ref) { | |
| ref.current = value; | |
| } | |
| } |
Xet Storage Details
- Size:
- 731 Bytes
- Xet hash:
- e9e33d252d76fa9a7ef638110c8ad544b49c3b0f7e61d37a78fb20fb415487ce
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.