Download Netflix-Clone/src/Components/WithSpinner/WithSpinnerItem.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerItem.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerItem.js
-
curl -L -o WithSpinnerItem.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Components/WithSpinner/WithSpinnerItem.js
306 Bytes
| import React from "react"; | |
| import Spinner from "../Spinner/Spinner"; | |
| const WithSpinnerItem = WrappedComponent => | |
| ({ isLoading, ...otherProps }) => { | |
| return isLoading | |
| ? <Spinner /> | |
| : <WrappedComponent {...otherProps} /> | |
| }; | |
| export default WithSpinnerItem; | |