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
"ReferenceError: useOutsideClick is not defined" in website #8446
Comments
I am checking github repo they are not added any custom hook useOutSideClick u can make your hook and enable above properties like this import React, { useRef, useState, useEffect } from "react"; function useOutsideClick(ref, handler) { document.addEventListener("mousedown", handleClickOutside); function Example() { useOutsideClick(modalRef, () => { return (
👋 Hey, I'm a modal. Click anywhere outside of me to close.
)} function App() { ); const rootElement = document.getElementById("root"); </React.StrictMode>, |
Description
When I entered Chakra-UI web page, an error had already occurred. check the error please
Chakra UI Version
2.8.2
Problem Statement/Justification
Problem: Reference error occur in the example code of the library documentation, making it difficult for users to follow the examples.
Proposal: It is expected that resolving error in the example code can address user confusion when reading the documentation.
Reasons:
Improved user convenience: Users can receive support to understand and resolve issues with example code.
Enhanced documentation quality: Enhancing the quality of library documentation can provide users with a better experience.
Proposed Solution or API
Alternatives
No response
Additional Information
please check this link and screenshots
https://v2.chakra-ui.com/docs/hooks/use-outside-click
The text was updated successfully, but these errors were encountered: