Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clearContainer is not a function #20

Open
yjwSurCode opened this issue Nov 8, 2021 · 2 comments
Open

clearContainer is not a function #20

yjwSurCode opened this issue Nov 8, 2021 · 2 comments

Comments

@yjwSurCode
Copy link

clearContainer is not a function why??

@yjwSurCode
Copy link
Author

{
"name": "cra-reconciler",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-reconciler": "^0.26.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

@cliffordfajardo
Copy link

cliffordfajardo commented Mar 21, 2022

Add an empty clearContainer method and that should resolve the problem:

clearContainer(container) {},

Working code:

Follow Ups (UPDATE RESOLVED ✅ )

The problem I'm now getting once upgrading to react 17.0.2 is that onClick doesn't work. I am getting the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'return')
CleanShot.2022-03-21.at.11.13.28.mp4

If you don't have prepareCommit returning null you will see the error in the video ^:

  // ✅ RESOLVED  error "Uncaught TypeError: Cannot read properties of undefined (reading 'return')"
  prepareForCommit() {
    return null
  },

Found the solution in this thread

Additional Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants