A hook that dispatches an event on component load/update.
event name
event payload
event target, default window
useDispatchEventOnLoad("nosto:ns-serp", { sectionId: "ns-serp" });return ( <div class="ns-serp ns-d-flex ns-flex-column ns-flex-md-row ns-font-inherit ns-p-4 ns-my-0 ns-mx-auto" data-nosto-element="search" > // Your content here </div>); Copy
useDispatchEventOnLoad("nosto:ns-serp", { sectionId: "ns-serp" });return ( <div class="ns-serp ns-d-flex ns-flex-column ns-flex-md-row ns-font-inherit ns-p-4 ns-my-0 ns-mx-auto" data-nosto-element="search" > // Your content here </div>);
A hook that dispatches an event on component load/update.