Next.js Discord

Discord Forum

React 19 + Next.JS Event binding

Unanswered
Gray Wagtail posted this in #help-forum
Open in Discord
Gray WagtailOP
Hi All! I am trying out the React 19 new custom element support, especially the event binding, and i am using Next js also. React now binds all the events to a proeperty starts with an on. I have a custom keydown event from a custom input name dds-keydown, so i bind this prop in the code named ondds-keydown. I start the code and nothing happens if i start to type, but if modify something in the code, for example i add a space, so the page will recompile, then the event binds correctly and everything works. I know this is something to do with the hydratation, but i can not really figure out what is happening. Default react events binds correctly. Have you guys experienced the same?

0 Replies