FormidableLabs / FormidableLabs/spectacle

[Bug] `Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.`

Open
#1,312 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.2k
Forks
700
PR merge metrics
No merged PRs in 30d

Description

When we want to use `useSteps` in a component inside a `

` element, we get the following console error:

```Warning: validateDOMNesting(...):

cannot appear as a descendant of

.```

See it in this codesandbox's console: https://codesandbox.io/s/infallible-hertz-2yjsj3?file=/src/index.js

**Current behavior:** The placeholder element produced by `useStep` is a `

`, which cannot always be inserted in the DOM without triggering the `validateDOMNesting` error in the console.

**Expected behavior:** useSteps should not return a `

` placeholder element since this triggers the aforementioned error. Instead, it could return a `` element, which would address this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.