I started an old course and the video shows that it has a rendering feature like this. I researched it and I think it is used with the Switch structure. Am I doing something wrong or what is the correct one?
<Route exact path="/" element={<NotFound />} /> <Route element={<NotFound />} /> </Routes> <ProductList products={this.state.products} addToCart={this.addToCart} currentCategory={this.state.currentCategory} info={productInfo} />`` When I use it this way, it brings the data to the home page without any problems, but when I type it in the comment line, the data does not come. The place where the data should come is empty