-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
<title> Hydration error in Next 15 #5991
Comments
@alirezagh73 This is how I am tackling it: import dynamic from "next/dynamic";
const CreatableSelect = dynamic(() => import("react-select/creatable"), { ssr: false }); It forces the component to client-side only. Here is my full component: "use client";
import dynamic from "next/dynamic";
const CreatableSelect = dynamic(() => import("react-select/creatable"), { ssr: false });
interface Props {}
export function LocationSearchField({}: Props) {
return (
<CreatableSelect
id="locationSearchField"
options={[/**/]}
/>
);
} |
@firminochangani However, your method does not work as expected. React Select will not be displayed before fully mounting the page, which causes a bad experience for the user. Therefore, we need to wait for a fixed bug from the package developer. |
Okay, after a short Google search, I found a solution that works for me. I just added the prop |
@Andcool-Systems are you using macos? |
@rodgarcialima windows |
@Andcool-Systems that's why it's working. |
@rodgarcialima does the os affect the behavior of react select? |
Please check this #5859 |
Thanks for using react-select!
If you are going to ask a question or want to propose a change or a new feature, then please don't file an issue for this.
Questions and feature requests have their own place in our discussions section.
Are you reporting a bug or runtime error?
Please include a test case that demonstrates the issue you're reporting!
This is very helpful to maintainers in order to help us see the issue you're seeing.
Please note we are currently only directing our efforts towards the current major (v5) version and beyond.
We understand this might be inconvenient but it is in the best interest of supporting the broader community and to sustain the
react-select
project going forward.To report bugs against react-select v5 please fork the following code-sandbox:
https://codesandbox.io/s/react-select-v5-sandbox-y5jtm
You may also find the online Babel tool quite helpful if you wish to use ES6/ES7 syntax not yet supported by the browser you are using.
The text was updated successfully, but these errors were encountered: