![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@graphcommerce/algolia-search
Advanced tools
Implementation of Algolia Instant Search inside Graphcommerce. Add client or server side product, category and pages search to your project!
Implementation of Algolia Instant Search inside Graphcommerce. Add client or server side product, category and pages search to your project!
@graphcommerce/next-ui
in your package.json.yarn add @graphcommerce/algolia-search@1.2.3
(replace 1.2.3 with the
version of the step above)This plugin contains different app and storefront configuration values.
App configuration values:
Storefront configuration values:
react-instantsearch-hooks-server
package to your projectyarn add react-instantsearch-hooks-server
or
npm install react-instantsearch-hooks-server
SearchResultProps
typetype SearchResultProps = DefaultPageQuery &
ProductListQuery &
ProductFiltersQuery &
CategorySearchQuery & {
filterTypes: FilterTypes
params: ProductListParams
+ serverState?: unknown
}
getServerState
method from the react-instantsearch-hooks-server
package to the imports of your search page...
import { getServerState } from 'react-instantsearch-hooks-server'
...
getServerState
method to the serverState
attribute inside of the return statement.return {
props: {
...(await page).data,
...(await products).data,
...(await filters).data,
...(await categories)?.data,
...(await layout)?.data,
filterTypes: await filterTypes,
params: productListParams,
up: { href: '/', title: 'Home' },
apolloState: await conf.then(() => client.cache.extract()),
+ serverState: await getServerState(<SearchContext rendersInsideNextjs={false} />, {
+ renderToString,
+ }),
},
revalidate: 60 * 20,
}
serverState
to the SearchContext
component.+ const { products, categories, params, filters, filterTypes, serverState } = props
const search = params.url.split('/')[1]
const totalSearchResults = (categories?.items?.length ?? 0) + (products?.total_count ?? 0)
const noSearchResults = search && (!products || (products.items && products?.items?.length <= 0))
return (
<>
<PageMeta
title={
search
? i18n._(/* i18n */ 'Results for ‘{search}’', { search })
: i18n._(/* i18n */ 'Search')
}
metaRobots={['noindex']}
canonical='/search'
/>
+ <SearchContext serverProps={serverState}>
FAQs
❗️❗️ NOT SUPPORTED: Does not work with productFiltersPro and does not work with ProductListLayout/\* components. No further development will be done. Please use [@graphcommerce/algolia-products](../algolia-products/README.md) ❗️❗️
The npm package @graphcommerce/algolia-search receives a total of 170 weekly downloads. As such, @graphcommerce/algolia-search popularity was classified as not popular.
We found that @graphcommerce/algolia-search demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.