Skip to content

Tag: javascript

Flatten nested JavaScript object

I have a nested object and I want to flatten/map it into a single-layered, table-like object. From that, I want to get something like this: Sure, I could simply iterate over the object with two for loops and put the result info a separate array, but I wonder, if there is a simpler solution. I already tried to…

Why pass {…props} in a React Route?

I’m using the route below just because it was the code I found on the web: I know the {…props} denotes multiple arguments but I can’t understand why I need it at all because the code below also works just fine and props.msg is available in Test expected So what does {…props} actually d…