fix: resolve react-beautiful-dnd invariants, controlled input warnings, and empty project link crash in React 18+#42
Open
sundar-prakash wants to merge 2 commits into
Conversation
…s, and project links in React 18+
Contributor
|
@sundar-prakash is attempting to deploy a commit to the Saurav Hathi's projects Team on Vercel. A member of the Team first needs to authorize it. |
Premkrishnavp887
left a comment
There was a problem hiding this comment.
Build Failure: Docker image build fails during the dependency installation stage because package.json and yarn.lock are out of sync. The build uses yarn install --frozen-lockfile, which correctly enforces reproducible builds and prevents automatic lockfile updates. Please regenerate and commit the updated yarn.lock file before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
This pull request addresses several runtime crashes, console warnings, and React 18 / Next.js server-side hydration bugs to make the builder production-ready and fully compatible.
1. React 18 / Next.js
react-beautiful-dndInvariant Crashesreact-beautiful-dnd's internaldefaultPropsfail to merge properly on render. This caused the page to crash with three successive invariant errors:Invariant failed: isDropDisabled must be a booleanInvariant failed: isCombineEnabled must be a booleanInvariant failed: ignoreContainerClipping must be a booleanisDropDisabled={false},isCombineEnabled={false}, andignoreContainerClipping={false}props on all<Droppable>components across the preview files:LeftSide.jsxWorkExperiences.jsxProjects.jsxWorkExperience.jsxindex={index}prop from the loop inWorkExperiences.jsxto<WorkExperience />draggable children.2. Project Link Runtime Crash
Failed prop type: The prop href expects a string or object in <Link>, but got undefined instead.<Link>tag inProjects.jsxpreview component with a check{item.link && ( ... )}to only render it when a valid URL is present.3. Controlled to Uncontrolled Component Warning
{ title: "" }instead of{ name: "" }. Because the inputs bind toname,project.nameevaluated asundefined, causing React's controlled-to-uncontrolled input warning.addProject.jsto correctly initialize withname: "".|| ""on the value props of inputs inProject.jsx,WorkExperience.jsx,Education.jsx,PersonalInformation.jsx, andSummary.jsxto prevent React from encounteringundefinedvalue states.How to Verify
npm run buildorpnpm run build(now compiles with a perfect exit code0).pnpm run dev); there are no console warnings or invariant errors.