Skip to content
Advertisement

Why is it not reading the params?

I am trying to read the code but its returning undefined. I want to read the code from the route and display it in h3 tag.

The Routing

JavaScript

The Room Component

JavaScript

Thanks in advance

Advertisement

Answer

The route components should be passed as JSX, not as an invoked function.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement