Prop `placeholder` did not match. Server: X Client: Y
Unanswered
Crème D’Argent posted this in #help-forum
Crème D’ArgentOP
Hi, I have a <input /> element for which I generate a placeholder that is a random city in the world. I have an array of around 50 cities and it chooses one at random each time the input is rendered:
And then:
What can I do to fix this error message I am getting? I alredy have "use client" at the top of this file
const placeholderLocation = useMemo(() => {
return randomLocationName();
}, []);And then:
<input placeholder={placeholderLocation}/>What can I do to fix this error message I am getting? I alredy have "use client" at the top of this file
2 Replies
@Crème D’Argent Hi, I have a <input /> element for which I generate a placeholder that is a random city in the world. I have an array of around 50 cities and it chooses one at random each time the input is rendered:
const placeholderLocation = useMemo(() => {
return randomLocationName();
}, []);
And then:
<input placeholder={placeholderLocation}/>
What can I do to fix this error message I am getting? I alredy have "use client" at the top of this file
Munchkin
maybe start off by posting your error message?
@Munchkin maybe start off by posting your error message?
Crème D’ArgentOP
Prop
placeholder did not match. Server: London Client: New York