diff --git a/docs/3.api/3.utils/create-event-loader.md b/docs/3.api/3.utils/create-event-loader.md new file mode 100644 index 0000000000..31f60eb271 --- /dev/null +++ b/docs/3.api/3.utils/create-event-loader.md @@ -0,0 +1,33 @@ +--- +title: 'createEventLoader' +description: A utility function to select the events used for event-based delayed hydration. +links: + - label: Source + icon: i-simple-icons-github + to: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/hydrate.ts + size: xs +--- + +You can use this utility to set specific events that would trigger hydration in event-based delayed hydration components. + +## Parameters + +- `options`: An array of valid HTML events. + +## Example + +If you would like to trigger hydration when the element is either clicked or has the mouse over it: + +```vue [pages/index.vue] +