logo

Crowdly

Browser

Add to Chrome

We need to handle a route with an optional parameter: /cart/{id} - where id is o...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

We need to handle a route with an optional parameter: /cart/{id} - where id is optional. So that, for example, /cart/3 and /cart would be handled by the same component CartPage.

The parameter should be bound to a variable when using useParams in the CartPage component.

Please, select the correct ways to define this:

0%
0%
More questions like this

Want instant access to all verified answers on softserve.academy?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome