From a400a2ffa86a233a51a080552366ac5e492d0334 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Fri, 3 Jan 2025 16:35:10 -0600 Subject: [PATCH 01/11] react module 2 updates --- .../setting-up-your-environment.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md index dffe38a12..7e9e06040 100644 --- a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md +++ b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md @@ -33,9 +33,10 @@ Our solution requires the [Node.js](https://nodejs.org/) JavaScript runtime envi ### Setup 1 -This course requires Node.js version 18 or 20 (we suggest using the long-term support release of version 20). +This course requires Node.js version 22 (we suggest using the long-term support (LTS) release of version 22). The simplest approach is to download the [Node.js installer](https://nodejs.org/en/download) for your operating system. Any installation of Node.js will also include npm. +Note: if using a terminal, then you may need to close and reopen it for the changes to the path to take effect. Alternatively, you can [install Node.js via package manager](https://nodejs.org/en/download/package-manager); this is the reccomendation for most professional setups. @@ -53,7 +54,7 @@ The installation process can take 10 to 15 minutes to complete. node --version ``` -The output of the command will be the current version of Node.js, we expect it to start with either "v18" or "v20". +The output of the command will be the current version of Node.js, we expect it to start with "v22". ✏️ Run the following command in a terminal to verify `npm` is installed correctly: @@ -61,7 +62,7 @@ The output of the command will be the current version of Node.js, we expect it t npm --version ``` -The output of the command will be the current version of `npm`, we expect it to start with either "9" or "10". +The output of the command will be the current version of `npm`, we expect it to start with "10". ## Objective 2: Generate the “Place My Order” application @@ -127,10 +128,12 @@ The development server is a useful tool. When it starts, it [transpiles](https:/ npm run dev ``` -The server will output the "Local" URL for the dev server, copy and paste it into a browser. The browser will display a welcome page with "Vite + React." +The server will output the "Local" URL for the dev server, copy and paste it into a browser. The browser will display a welcome page with "Vite + React." You can use `Control-C` to stop the dev server. Having issues with your local setup? See the solution in [StackBlitz](https://stackblitz.com/fork/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/02-solution?file=src/App.tsx) or [CodeSandbox](https://codesandbox.io/p/devbox/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/02-solution?file=src/App.tsx). +ERROR: Failed to resolve import "./assets/react.svg" from "src/App.tsx". Does the file exist? + ## Objective 3: Add testing infrastructure ### Testing code with React Testing Library @@ -168,6 +171,8 @@ npm run test and "No test files found" will be written to the console. +Note: may need to set execution policy if running on windows + Having issues with your local setup? See the solution in [StackBlitz](https://stackblitz.com/fork/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/03-solution?file=package.json) or [CodeSandbox](https://codesandbox.io/p/devbox/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/03-solution?file=package.json). ## Objective 4: Update our first page @@ -191,7 +196,7 @@ Remove these generated files that we won’t need. Some projects do need them, b - `src/assets` - `src/App.css` - `tsconfig.node.json` -- `.eslintrc.cjs` +- `.eslintrc.cjs` TODO: didn't have this, had `eslint.config.js` instead ✏️ Uninstall unneeded packages and Install our eslint config and prettier: From e8536ea4debc43c2d0483d5046702ddacd226624 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Fri, 3 Jan 2025 16:48:11 -0600 Subject: [PATCH 02/11] change eslint config file name --- .../setting-up-your-environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md index 7e9e06040..d32570b91 100644 --- a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md +++ b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md @@ -196,7 +196,7 @@ Remove these generated files that we won’t need. Some projects do need them, b - `src/assets` - `src/App.css` - `tsconfig.node.json` -- `.eslintrc.cjs` TODO: didn't have this, had `eslint.config.js` instead +- `eslint.config.js` ✏️ Uninstall unneeded packages and Install our eslint config and prettier: From 8c5104cb46cc5098200e1b9962e57037dab3d3ab Mon Sep 17 00:00:00 2001 From: David Brandon Date: Fri, 3 Jan 2025 16:51:12 -0600 Subject: [PATCH 03/11] add example command for setting execution policy on windows --- .../setting-up-your-environment.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md index d32570b91..93e8ea1fa 100644 --- a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md +++ b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md @@ -171,7 +171,11 @@ npm run test and "No test files found" will be written to the console. -Note: may need to set execution policy if running on windows +Note: may need to set execution policy if running on windows + +```shell +Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser +``` Having issues with your local setup? See the solution in [StackBlitz](https://stackblitz.com/fork/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/03-solution?file=package.json) or [CodeSandbox](https://codesandbox.io/p/devbox/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/03-solution?file=package.json). From 4f8140ae7bc7b4afadbcf486c072788b9cff3d3a Mon Sep 17 00:00:00 2001 From: David Brandon Date: Mon, 6 Jan 2025 17:13:36 -0600 Subject: [PATCH 04/11] addressing PR comments --- .../setting-up-your-environment.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md index 93e8ea1fa..2c54cb959 100644 --- a/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md +++ b/src/react-vite/02-setting-up-your-environment/setting-up-your-environment.md @@ -132,8 +132,6 @@ The server will output the "Local" URL for the dev server, copy and paste it int Having issues with your local setup? See the solution in [StackBlitz](https://stackblitz.com/fork/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/02-solution?file=src/App.tsx) or [CodeSandbox](https://codesandbox.io/p/devbox/github/bitovi/academy/tree/main/exercises/react-vite/02-setting-up-your-environment/02-solution?file=src/App.tsx). -ERROR: Failed to resolve import "./assets/react.svg" from "src/App.tsx". Does the file exist? - ## Objective 3: Add testing infrastructure ### Testing code with React Testing Library @@ -171,7 +169,7 @@ npm run test and "No test files found" will be written to the console. -Note: may need to set execution policy if running on windows +Note: may need to set execution policy if running on Windows. ```shell Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser @@ -200,7 +198,7 @@ Remove these generated files that we won’t need. Some projects do need them, b - `src/assets` - `src/App.css` - `tsconfig.node.json` -- `eslint.config.js` +- `.eslintrc.cjs` or `eslint.config.js` ✏️ Uninstall unneeded packages and Install our eslint config and prettier: From 19a84af6eb30bffa61db094671e35b989291043c Mon Sep 17 00:00:00 2001 From: David Brandon Date: Mon, 6 Jan 2025 17:13:57 -0600 Subject: [PATCH 05/11] issues with module 3 --- exercises/react-vite/03-intro-to-jsx/01-problem/src/App.tsx | 2 -- exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx | 2 -- exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx | 1 - exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx | 1 - src/react-vite/03-intro-to-jsx/intro-to-jsx.md | 2 +- 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/exercises/react-vite/03-intro-to-jsx/01-problem/src/App.tsx b/exercises/react-vite/03-intro-to-jsx/01-problem/src/App.tsx index c01bd0992..8fe85f580 100644 --- a/exercises/react-vite/03-intro-to-jsx/01-problem/src/App.tsx +++ b/exercises/react-vite/03-intro-to-jsx/01-problem/src/App.tsx @@ -1,5 +1,3 @@ -import "./App.css" - function App() { return ( <> diff --git a/exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx b/exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx index 175eddaf1..c6621d9b3 100644 --- a/exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx +++ b/exercises/react-vite/03-intro-to-jsx/01-solution/src/App.tsx @@ -1,5 +1,3 @@ -import "./App.css" - function App() { return ( <> diff --git a/exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx b/exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx index b728e4a3b..f5e887ca1 100644 --- a/exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx +++ b/exercises/react-vite/03-intro-to-jsx/02-problem/src/App.tsx @@ -1,6 +1,5 @@ import CheeseThumbnail from "place-my-order-assets/images/2-thumbnail.jpg" import PoutineThumbnail from "place-my-order-assets/images/4-thumbnail.jpg" -import "./App.css" function App() { const restaurants = { diff --git a/exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx b/exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx index 2e4c380af..5018bd283 100644 --- a/exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx +++ b/exercises/react-vite/03-intro-to-jsx/02-solution/src/App.tsx @@ -1,6 +1,5 @@ import CheeseThumbnail from "place-my-order-assets/images/2-thumbnail.jpg" import PoutineThumbnail from "place-my-order-assets/images/4-thumbnail.jpg" -import "./App.css" function App() { const restaurants = { diff --git a/src/react-vite/03-intro-to-jsx/intro-to-jsx.md b/src/react-vite/03-intro-to-jsx/intro-to-jsx.md index 8324e636d..b21003f20 100644 --- a/src/react-vite/03-intro-to-jsx/intro-to-jsx.md +++ b/src/react-vite/03-intro-to-jsx/intro-to-jsx.md @@ -95,7 +95,7 @@ In HTML, some elements are self-closing and don’t need a closing tag. For example: the `img` element is a self-closing element: ```html - + ``` In JSX, no elements are self-closing, which means that _all_ elements must have a closing tag, like the `img` below: From ee5833949e7d4fa1481f30eb22542ef27373d9f8 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Tue, 7 Jan 2025 16:46:55 -0600 Subject: [PATCH 06/11] remove ref to App.css in react --- .../02-setting-up-your-environment/02-solution/src/App.tsx | 1 - .../02-setting-up-your-environment/03-solution/src/App.tsx | 1 - exercises/react-vite/04-components/01-problem/src/App.tsx | 1 - exercises/react-vite/06-routing/01-problem/src/App.tsx | 1 - exercises/react-vite/06-routing/01-solution/src/App.tsx | 1 - exercises/react-vite/06-routing/02-problem/src/App.tsx | 1 - exercises/react-vite/06-routing/02-solution/src/App.tsx | 1 - exercises/react-vite/07-styling-in-react/01-problem/src/App.tsx | 1 - exercises/react-vite/07-styling-in-react/01-solution/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/01-problem/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/01-solution/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/02-problem/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/02-solution/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/03-problem/src/App.tsx | 1 - exercises/react-vite/08-stateful-hooks/03-solution/src/App.tsx | 1 - .../react-vite/09-making-http-requests/01-problem/src/App.tsx | 1 - .../react-vite/09-making-http-requests/01-solution/src/App.tsx | 1 - .../react-vite/09-making-http-requests/02-problem/src/App.tsx | 1 - .../react-vite/09-making-http-requests/02-solution/src/App.tsx | 1 - .../react-vite/09-making-http-requests/03-problem/src/App.tsx | 1 - .../react-vite/09-making-http-requests/03-solution/src/App.tsx | 1 - .../react-vite/09-making-http-requests/04-problem/src/App.tsx | 1 - .../react-vite/09-making-http-requests/04-solution/src/App.tsx | 1 - .../react-vite/09-making-http-requests/05-problem/src/App.tsx | 1 - .../react-vite/09-making-http-requests/05-solution/src/App.tsx | 1 - exercises/react-vite/10-nested-routes/01-solution/src/App.tsx | 1 - exercises/react-vite/10-nested-routes/02-solution/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/01-problem/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/01-solution/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/02-problem/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/02-solution/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/03-problem/src/App.tsx | 1 - .../11-controlled-vs-uncontrolled/03-solution/src/App.tsx | 1 - exercises/react-vite/12-testing/01-problem/src/App.tsx | 1 - exercises/react-vite/12-testing/01-solution/src/App.tsx | 1 - exercises/react-vite/12-testing/02-problem/src/App.tsx | 1 - exercises/react-vite/12-testing/02-solution/src/App.tsx | 1 - 37 files changed, 37 deletions(-) diff --git a/exercises/react-vite/02-setting-up-your-environment/02-solution/src/App.tsx b/exercises/react-vite/02-setting-up-your-environment/02-solution/src/App.tsx index 07a24095d..e8a36121a 100644 --- a/exercises/react-vite/02-setting-up-your-environment/02-solution/src/App.tsx +++ b/exercises/react-vite/02-setting-up-your-environment/02-solution/src/App.tsx @@ -1,7 +1,6 @@ import { useState } from "react" import reactLogo from "./assets/react.svg" import viteLogo from "./assets/vite.svg" -import "./App.css" function App() { const [count, setCount] = useState(0) diff --git a/exercises/react-vite/02-setting-up-your-environment/03-solution/src/App.tsx b/exercises/react-vite/02-setting-up-your-environment/03-solution/src/App.tsx index 07a24095d..e8a36121a 100644 --- a/exercises/react-vite/02-setting-up-your-environment/03-solution/src/App.tsx +++ b/exercises/react-vite/02-setting-up-your-environment/03-solution/src/App.tsx @@ -1,7 +1,6 @@ import { useState } from "react" import reactLogo from "./assets/react.svg" import viteLogo from "./assets/vite.svg" -import "./App.css" function App() { const [count, setCount] = useState(0) diff --git a/exercises/react-vite/04-components/01-problem/src/App.tsx b/exercises/react-vite/04-components/01-problem/src/App.tsx index 6f16b0749..89523951d 100644 --- a/exercises/react-vite/04-components/01-problem/src/App.tsx +++ b/exercises/react-vite/04-components/01-problem/src/App.tsx @@ -1,7 +1,6 @@ import CheeseThumbnail from "place-my-order-assets/images/2-thumbnail.jpg" import PoutineThumbnail from "place-my-order-assets/images/4-thumbnail.jpg" import RestaurantList from "./pages/RestaurantList" -import "./App.css" function App() { const restaurants = { diff --git a/exercises/react-vite/06-routing/01-problem/src/App.tsx b/exercises/react-vite/06-routing/01-problem/src/App.tsx index 89ea7072e..e118f1fb5 100644 --- a/exercises/react-vite/06-routing/01-problem/src/App.tsx +++ b/exercises/react-vite/06-routing/01-problem/src/App.tsx @@ -1,6 +1,5 @@ import { Outlet } from "react-router-dom" import RestaurantList from "./pages/RestaurantList" -import "./App.css" function App() { return ( diff --git a/exercises/react-vite/06-routing/01-solution/src/App.tsx b/exercises/react-vite/06-routing/01-solution/src/App.tsx index 6b9ce5882..70b1128b0 100644 --- a/exercises/react-vite/06-routing/01-solution/src/App.tsx +++ b/exercises/react-vite/06-routing/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Outlet } from "react-router-dom" -import "./App.css" function App() { return ( diff --git a/exercises/react-vite/06-routing/02-problem/src/App.tsx b/exercises/react-vite/06-routing/02-problem/src/App.tsx index 339fe0818..6c0f84688 100644 --- a/exercises/react-vite/06-routing/02-problem/src/App.tsx +++ b/exercises/react-vite/06-routing/02-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { return ( diff --git a/exercises/react-vite/06-routing/02-solution/src/App.tsx b/exercises/react-vite/06-routing/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/06-routing/02-solution/src/App.tsx +++ b/exercises/react-vite/06-routing/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/07-styling-in-react/01-problem/src/App.tsx b/exercises/react-vite/07-styling-in-react/01-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/07-styling-in-react/01-problem/src/App.tsx +++ b/exercises/react-vite/07-styling-in-react/01-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/07-styling-in-react/01-solution/src/App.tsx b/exercises/react-vite/07-styling-in-react/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/07-styling-in-react/01-solution/src/App.tsx +++ b/exercises/react-vite/07-styling-in-react/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/01-problem/src/App.tsx b/exercises/react-vite/08-stateful-hooks/01-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/01-problem/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/01-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/01-solution/src/App.tsx b/exercises/react-vite/08-stateful-hooks/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/01-solution/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/02-problem/src/App.tsx b/exercises/react-vite/08-stateful-hooks/02-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/02-problem/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/02-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/02-solution/src/App.tsx b/exercises/react-vite/08-stateful-hooks/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/02-solution/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/03-problem/src/App.tsx b/exercises/react-vite/08-stateful-hooks/03-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/03-problem/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/03-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/08-stateful-hooks/03-solution/src/App.tsx b/exercises/react-vite/08-stateful-hooks/03-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/08-stateful-hooks/03-solution/src/App.tsx +++ b/exercises/react-vite/08-stateful-hooks/03-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/01-problem/src/App.tsx b/exercises/react-vite/09-making-http-requests/01-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/01-problem/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/01-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/01-solution/src/App.tsx b/exercises/react-vite/09-making-http-requests/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/01-solution/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/02-problem/src/App.tsx b/exercises/react-vite/09-making-http-requests/02-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/02-problem/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/02-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/02-solution/src/App.tsx b/exercises/react-vite/09-making-http-requests/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/02-solution/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/03-problem/src/App.tsx b/exercises/react-vite/09-making-http-requests/03-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/03-problem/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/03-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/03-solution/src/App.tsx b/exercises/react-vite/09-making-http-requests/03-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/03-solution/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/03-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/04-problem/src/App.tsx b/exercises/react-vite/09-making-http-requests/04-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/04-problem/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/04-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/04-solution/src/App.tsx b/exercises/react-vite/09-making-http-requests/04-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/04-solution/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/04-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/05-problem/src/App.tsx b/exercises/react-vite/09-making-http-requests/05-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/05-problem/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/05-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/09-making-http-requests/05-solution/src/App.tsx b/exercises/react-vite/09-making-http-requests/05-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/09-making-http-requests/05-solution/src/App.tsx +++ b/exercises/react-vite/09-making-http-requests/05-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/10-nested-routes/01-solution/src/App.tsx b/exercises/react-vite/10-nested-routes/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/10-nested-routes/01-solution/src/App.tsx +++ b/exercises/react-vite/10-nested-routes/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/10-nested-routes/02-solution/src/App.tsx b/exercises/react-vite/10-nested-routes/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/10-nested-routes/02-solution/src/App.tsx +++ b/exercises/react-vite/10-nested-routes/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/src/App.tsx b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/src/App.tsx +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/12-testing/01-problem/src/App.tsx b/exercises/react-vite/12-testing/01-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/12-testing/01-problem/src/App.tsx +++ b/exercises/react-vite/12-testing/01-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/12-testing/01-solution/src/App.tsx b/exercises/react-vite/12-testing/01-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/12-testing/01-solution/src/App.tsx +++ b/exercises/react-vite/12-testing/01-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/12-testing/02-problem/src/App.tsx b/exercises/react-vite/12-testing/02-problem/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/12-testing/02-problem/src/App.tsx +++ b/exercises/react-vite/12-testing/02-problem/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") diff --git a/exercises/react-vite/12-testing/02-solution/src/App.tsx b/exercises/react-vite/12-testing/02-solution/src/App.tsx index 8ad4574a8..a49bb43c3 100644 --- a/exercises/react-vite/12-testing/02-solution/src/App.tsx +++ b/exercises/react-vite/12-testing/02-solution/src/App.tsx @@ -1,5 +1,4 @@ import { Link, Outlet, useMatch } from "react-router-dom" -import "./App.css" function App() { const homeMatch = useMatch("/") From 7b7bf48b64788ff4c99aaca54f14c568a611f661 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Tue, 7 Jan 2025 16:47:25 -0600 Subject: [PATCH 07/11] the api script being added in module 9 is incorrect --- src/react-vite/09-making-http-requests/making-http-requests.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/react-vite/09-making-http-requests/making-http-requests.md b/src/react-vite/09-making-http-requests/making-http-requests.md index 05092ae50..8813404eb 100644 --- a/src/react-vite/09-making-http-requests/making-http-requests.md +++ b/src/react-vite/09-making-http-requests/making-http-requests.md @@ -176,6 +176,8 @@ npm install place-my-order-api@1 npm run api ``` +// TODO fix this ref to the api + Double check the API by navigating to localhost:7070/restaurants. You should see a JSON list of restaurant data. It will be helpful to have a third terminal tab for the `npm run api` command. From ca3451a56fa75c4a020e6c5a4045c281c2aa0019 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Wed, 8 Jan 2025 09:55:21 -0600 Subject: [PATCH 08/11] fixed issue with api script --- .../react-vite/09-making-http-requests/02-solution/package.json | 1 + .../react-vite/09-making-http-requests/03-problem/package.json | 1 + .../react-vite/09-making-http-requests/03-solution/package.json | 1 + .../react-vite/09-making-http-requests/04-problem/package.json | 1 + .../react-vite/09-making-http-requests/04-solution/package.json | 1 + .../react-vite/09-making-http-requests/05-problem/package.json | 1 + .../react-vite/09-making-http-requests/05-solution/package.json | 1 + exercises/react-vite/10-nested-routes/01-solution/package.json | 1 + exercises/react-vite/10-nested-routes/02-solution/package.json | 1 + .../11-controlled-vs-uncontrolled/01-problem/package.json | 1 + .../11-controlled-vs-uncontrolled/01-solution/package.json | 1 + .../11-controlled-vs-uncontrolled/02-problem/package.json | 1 + .../11-controlled-vs-uncontrolled/02-solution/package.json | 1 + .../11-controlled-vs-uncontrolled/03-problem/package.json | 1 + .../11-controlled-vs-uncontrolled/03-solution/package.json | 1 + exercises/react-vite/12-testing/01-problem/package.json | 1 + exercises/react-vite/12-testing/01-solution/package.json | 1 + exercises/react-vite/12-testing/02-problem/package.json | 1 + exercises/react-vite/12-testing/02-solution/package.json | 1 + 19 files changed, 19 insertions(+) diff --git a/exercises/react-vite/09-making-http-requests/02-solution/package.json b/exercises/react-vite/09-making-http-requests/02-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/02-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/02-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/03-problem/package.json b/exercises/react-vite/09-making-http-requests/03-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/03-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/03-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/03-solution/package.json b/exercises/react-vite/09-making-http-requests/03-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/03-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/03-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/04-problem/package.json b/exercises/react-vite/09-making-http-requests/04-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/04-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/04-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/04-solution/package.json b/exercises/react-vite/09-making-http-requests/04-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/04-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/04-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/05-problem/package.json b/exercises/react-vite/09-making-http-requests/05-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/05-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/05-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/05-solution/package.json b/exercises/react-vite/09-making-http-requests/05-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/09-making-http-requests/05-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/05-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/10-nested-routes/01-solution/package.json b/exercises/react-vite/10-nested-routes/01-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/10-nested-routes/01-solution/package.json +++ b/exercises/react-vite/10-nested-routes/01-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/10-nested-routes/02-solution/package.json b/exercises/react-vite/10-nested-routes/02-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/10-nested-routes/02-solution/package.json +++ b/exercises/react-vite/10-nested-routes/02-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/01-problem/package.json b/exercises/react-vite/12-testing/01-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/12-testing/01-problem/package.json +++ b/exercises/react-vite/12-testing/01-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/01-solution/package.json b/exercises/react-vite/12-testing/01-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/12-testing/01-solution/package.json +++ b/exercises/react-vite/12-testing/01-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/02-problem/package.json b/exercises/react-vite/12-testing/02-problem/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/12-testing/02-problem/package.json +++ b/exercises/react-vite/12-testing/02-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/02-solution/package.json b/exercises/react-vite/12-testing/02-solution/package.json index c8bdaf9fc..daf3ab5ca 100644 --- a/exercises/react-vite/12-testing/02-solution/package.json +++ b/exercises/react-vite/12-testing/02-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"PORT=7070 node_modules/.bin/place-my-order-api", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", From d681dd513972547e9449cc2d19ded90f02675e67 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Wed, 8 Jan 2025 10:33:49 -0600 Subject: [PATCH 09/11] support windows --- .../react-vite/09-making-http-requests/02-solution/package.json | 2 +- .../react-vite/09-making-http-requests/03-problem/package.json | 2 +- .../react-vite/09-making-http-requests/03-solution/package.json | 2 +- .../react-vite/09-making-http-requests/04-problem/package.json | 2 +- .../react-vite/09-making-http-requests/04-solution/package.json | 2 +- .../react-vite/09-making-http-requests/05-problem/package.json | 2 +- .../react-vite/09-making-http-requests/05-solution/package.json | 2 +- exercises/react-vite/10-nested-routes/01-solution/package.json | 2 +- exercises/react-vite/10-nested-routes/02-solution/package.json | 2 +- .../11-controlled-vs-uncontrolled/01-problem/package.json | 2 +- .../11-controlled-vs-uncontrolled/01-solution/package.json | 2 +- .../11-controlled-vs-uncontrolled/02-problem/package.json | 2 +- .../11-controlled-vs-uncontrolled/02-solution/package.json | 2 +- .../11-controlled-vs-uncontrolled/03-problem/package.json | 2 +- .../11-controlled-vs-uncontrolled/03-solution/package.json | 2 +- exercises/react-vite/12-testing/01-problem/package.json | 2 +- exercises/react-vite/12-testing/01-solution/package.json | 2 +- exercises/react-vite/12-testing/02-problem/package.json | 2 +- exercises/react-vite/12-testing/02-solution/package.json | 2 +- src/react-vite/09-making-http-requests/making-http-requests.md | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/exercises/react-vite/09-making-http-requests/02-solution/package.json b/exercises/react-vite/09-making-http-requests/02-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/02-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/02-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/03-problem/package.json b/exercises/react-vite/09-making-http-requests/03-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/03-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/03-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/03-solution/package.json b/exercises/react-vite/09-making-http-requests/03-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/03-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/03-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/04-problem/package.json b/exercises/react-vite/09-making-http-requests/04-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/04-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/04-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/04-solution/package.json b/exercises/react-vite/09-making-http-requests/04-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/04-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/04-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/05-problem/package.json b/exercises/react-vite/09-making-http-requests/05-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/05-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/05-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/05-solution/package.json b/exercises/react-vite/09-making-http-requests/05-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/05-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/05-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/10-nested-routes/01-solution/package.json b/exercises/react-vite/10-nested-routes/01-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/10-nested-routes/01-solution/package.json +++ b/exercises/react-vite/10-nested-routes/01-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/10-nested-routes/02-solution/package.json b/exercises/react-vite/10-nested-routes/02-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/10-nested-routes/02-solution/package.json +++ b/exercises/react-vite/10-nested-routes/02-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/01-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/02-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json +++ b/exercises/react-vite/11-controlled-vs-uncontrolled/03-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/01-problem/package.json b/exercises/react-vite/12-testing/01-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/12-testing/01-problem/package.json +++ b/exercises/react-vite/12-testing/01-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/01-solution/package.json b/exercises/react-vite/12-testing/01-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/12-testing/01-solution/package.json +++ b/exercises/react-vite/12-testing/01-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/02-problem/package.json b/exercises/react-vite/12-testing/02-problem/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/12-testing/02-problem/package.json +++ b/exercises/react-vite/12-testing/02-problem/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/12-testing/02-solution/package.json b/exercises/react-vite/12-testing/02-solution/package.json index daf3ab5ca..9fd59f15d 100644 --- a/exercises/react-vite/12-testing/02-solution/package.json +++ b/exercises/react-vite/12-testing/02-solution/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "api":"PORT=7070 node_modules/.bin/place-my-order-api", + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/src/react-vite/09-making-http-requests/making-http-requests.md b/src/react-vite/09-making-http-requests/making-http-requests.md index 8813404eb..61428f7bd 100644 --- a/src/react-vite/09-making-http-requests/making-http-requests.md +++ b/src/react-vite/09-making-http-requests/making-http-requests.md @@ -165,7 +165,7 @@ Before we begin requesting data from our API, we need to install the `place-my-o npm install place-my-order-api@1 ``` -✏️ Next add an API script to your `package.json` +✏️ Next add an API script to your `package.json`. NOTE: change `/` to `\\` if on windows @sourceref ../../../exercises/react-vite/09-making-http-requests/02-solution/package.json @highlight 7, only From 9c2daa2979fbdf580b57183188225ffe05b6ef24 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Wed, 8 Jan 2025 10:46:04 -0600 Subject: [PATCH 10/11] update text --- .../09-making-http-requests/making-http-requests.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/react-vite/09-making-http-requests/making-http-requests.md b/src/react-vite/09-making-http-requests/making-http-requests.md index 61428f7bd..5a1e41967 100644 --- a/src/react-vite/09-making-http-requests/making-http-requests.md +++ b/src/react-vite/09-making-http-requests/making-http-requests.md @@ -165,7 +165,7 @@ Before we begin requesting data from our API, we need to install the `place-my-o npm install place-my-order-api@1 ``` -✏️ Next add an API script to your `package.json`. NOTE: change `/` to `\\` if on windows +✏️ Next add an API script to your `package.json`. NOTE: if on windows, change `/` to `\\`. @sourceref ../../../exercises/react-vite/09-making-http-requests/02-solution/package.json @highlight 7, only @@ -176,8 +176,6 @@ npm install place-my-order-api@1 npm run api ``` -// TODO fix this ref to the api - Double check the API by navigating to localhost:7070/restaurants. You should see a JSON list of restaurant data. It will be helpful to have a third terminal tab for the `npm run api` command. From bfdd421a0b0ad6857c4505e2972f3c6da7678420 Mon Sep 17 00:00:00 2001 From: David Brandon Date: Thu, 9 Jan 2025 11:23:54 -0600 Subject: [PATCH 11/11] fixed module 9 setup 1 --- .../react-vite/09-making-http-requests/01-problem/package.json | 1 + .../react-vite/09-making-http-requests/01-solution/package.json | 1 + .../react-vite/09-making-http-requests/02-problem/package.json | 1 + src/react-vite/09-making-http-requests/making-http-requests.md | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exercises/react-vite/09-making-http-requests/01-problem/package.json b/exercises/react-vite/09-making-http-requests/01-problem/package.json index c8bdaf9fc..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/01-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/01-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/01-solution/package.json b/exercises/react-vite/09-making-http-requests/01-solution/package.json index c8bdaf9fc..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/01-solution/package.json +++ b/exercises/react-vite/09-making-http-requests/01-solution/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/exercises/react-vite/09-making-http-requests/02-problem/package.json b/exercises/react-vite/09-making-http-requests/02-problem/package.json index c8bdaf9fc..9fd59f15d 100644 --- a/exercises/react-vite/09-making-http-requests/02-problem/package.json +++ b/exercises/react-vite/09-making-http-requests/02-problem/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { + "api":"./node_modules/.bin/place-my-order-api -p 7070", "typecheck": "tsc", "eslint": "eslint vite.config.ts src", "prettier": "prettier --check vite.config.ts src", diff --git a/src/react-vite/09-making-http-requests/making-http-requests.md b/src/react-vite/09-making-http-requests/making-http-requests.md index 5a1e41967..ed5100467 100644 --- a/src/react-vite/09-making-http-requests/making-http-requests.md +++ b/src/react-vite/09-making-http-requests/making-http-requests.md @@ -167,7 +167,7 @@ npm install place-my-order-api@1 ✏️ Next add an API script to your `package.json`. NOTE: if on windows, change `/` to `\\`. -@sourceref ../../../exercises/react-vite/09-making-http-requests/02-solution/package.json +@sourceref ../../../exercises/react-vite/09-making-http-requests/01-problem/package.json @highlight 7, only ✏️ In a **new** terminal window, start the API server by running: