Blog

This page displays results from an Elastic crawl of the main Kitchen Love site. To see the search results, you’ll need to provide a valid API key in the box below.


import React from "npm:react";
import { createRoot } from "npm:react-dom/client";
import SearchApp, { makeDriver } from "/components/Elastic.js";

const mount = display(document.createElement("div"));
const endpoint = "https://tilix.es.uksouth.azure.elastic-cloud.com";
const index = "search-kitchenlove";
const driver = await makeDriver(endpoint, index, key);
const el = React.createElement(SearchApp, { driver });
createRoot(mount).render(el);

JSX code for Elastic

Below is the source of the Elastic JSX component that powers the search interface.