question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

github_iconTop GitHub Comments

TheSharpieOnecommented, Apr 26, 2018

Notice the tag prop on the Media which has left, it’s needed for the workaround. The example I posted above has that and gets no errors or warnings.

3reactions
TheSharpieOnecommented, Apr 25, 2018

What @gergely-nagy said is correct, but I think this may also be a slight defect. reactstrap is defaulting <Media left/right ...> to an anchor tag (<a>) which causing the nested a within an a. We probably should only default that in the case there is an href prop (to indicate there should be a link)

https://github.com/reactstrap/reactstrap/blob/6eac0fd5719eb07a2350bcd41462bc4a2946c8b8/src/Media.js#L40-L50

I think we can do some better defaulting there. For instance, not only can we only make it an anchor tag (a) when there is an href (attributes.href && (left || right), we probably should only make it an image tag (img) when there is a src (attributes.src && object)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: validateDOMNesting(...): <a> cannot appear as a ...
Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>. I don't know what to do. I needed to style the router navigation ......
Read more >
<a> cannot appear as a descendant of < ...
So you are getting error,. Warning: validateDOMNesting(…): <a> cannot appear as a descendant of <a>. To solve this just use one of the...
Read more >
Warning: validateDOMNesting(...): <button> cannot appear as ...
Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>. in button ; Priority, Normal N ; Type, Bug ; State, Open O...
Read more >
“Warning: validateDOMNesting(...): <a> cannot appear as a ...
“Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a> material ui” Code Answer's · validateDOMNesting(...): cannot appear as a descendant ...
Read more >
button cannot appear as a descendant of button
Let's say we're given the following mock from a designer to list files in rows. Each row should be... Tagged with react, html....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found