react-component / react-component/drawer
Next.JS server side: Expected server HTML to caontain a matching <div> in <div>
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 425
- Forks
- 108
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 1
Description
Get Expected server HTML to caontain a matching <div> in <div> error when Next.JS try to render the component on the server side.
An approach to fix this issue can be related to this next.js discussion
Warning: Expected server HTML to contain a matching <div> in <div>.
at div
at div
at DrawerChild (webpack-internal:///../../.yarn/$$virtual/rc-drawer-virtual-a9cb80f40d/0/cache/rc-drawer-npm-4.2.2-ee8e7f6abf-9e919c7968.zip/node_modules/rc-drawer/es/DrawerChild.js:42:94)
at eval (webpack-internal:///../../.yarn/$$virtual/rc-util-virtual-7b83a5d0a6/0/cache/rc-util-npm-5.7.0-bdc90de661-b15423c992.zip/node_modules/rc-util/es/Portal.js:11:25)
at PortalWrapper (webpack-internal:///../../.yarn/$$virtual/rc-util-virtual-7b83a5d0a6/0/cache/rc-util-npm-5.7.0-bdc90de661-b15423c992.zip/node_modules/rc-util/es/PortalWrapper.js:77:94)
at DrawerWrapper (webpack-internal:///../../.yarn/$$virtual/rc-drawer-virtual-a9cb80f40d/0/cache/rc-drawer-npm-4.2.2-ee8e7f6abf-9e919c7968.zip/node_modules/rc-drawer/es/DrawerWrapper.js:30:94)
at Drawer (webpack-internal:///../../.yarn/$$virtual/antd-virtual-ae5f2a8313/0/cache/antd-npm-4.10.3-9a51b66bae-4decd8e156.zip/node_modules/antd/es/drawer/index.js:62:94)
at DrawerWrapper (webpack-internal:///../../.yarn/$$virtual/antd-virtual-ae5f2a8313/0/cache/antd-npm-4.10.3-9a51b66bae-4decd8e156.zip/node_modules/antd/es/drawer/index.js:350:34)
at FilterWrapper (webpack-internal:///./components/...)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the server-rendering warning and trace the mentioned DrawerChild.js, Portal.js, PortalWrapper.js, and Ant Design Drawer stack. Compare the behavior with the linked Next.js discussion, then verify that the matching-div warning no longer appears during Next.js server rendering while drawer behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, react, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100