Download next.js/test/e2e/app-dir/actions/app/use-transition/action.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 166 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/use-transition/action.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/actions/app/use-transition/action.js
-
curl -L -o action.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/use-transition/action.js
166 Bytes
| 'use server' | |
| export async function addToCart() { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => { | |
| resolve('Add to cart') | |
| }, 1000) | |
| }) | |
| } | |