Why the left code isn't working but the right one is?
: S
Solution:
Turns out I was returning an object and I must wrap it with something in order to make the jsx work
React router best practice
Im new to react router, I want to pass state down to my components that are in different URL paths
This is the file I'm stuck with,
App.tsx
```ts
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import Greeting from './pages/Greeting';...Solution:
Solution is to use
useOutletContext
How can I exclude the street name out of the string this component give me?
I am using '@react-google-maps/api', basically the component is a dropdown and an search input for searching hotel names, just like the real google maps. the problem is that I do not know how to exclude the street name out of the string it give me, which is what I wish. any ideas will be appreciated, thanks :]
example of a result string: Hotel Washington, 15th Street Northwest, Washington, DC, USA (I am not sure that all hotel names will be without a comma in their naming)...
React useContext is not a function...
Plz, someone can help me with the error in the image?
Code:
```tsx
import { Chip } from "@nextui-org/react";...
Solution:
My bad bro, i dont have the Context.Provider 🥲