File tree Expand file tree Collapse file tree
react-instantsearch-hooks/remix Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { renderToString } from 'react-dom/server' ;
12import algoliasearch from 'algoliasearch/lite' ;
23import type { InstantSearchServerState } from 'react-instantsearch-hooks-web' ;
34import {
@@ -38,7 +39,9 @@ export const links: LinksFunction = () => [
3839
3940export const loader : LoaderFunction = async ( { request } ) => {
4041 const serverUrl = request . url ;
41- const serverState = await getServerState ( < Search serverUrl = { serverUrl } /> ) ;
42+ const serverState = await getServerState ( < Search serverUrl = { serverUrl } /> , {
43+ renderToString,
44+ } ) ;
4245
4346 return json ( {
4447 serverState,
Original file line number Diff line number Diff line change 2121 "instantsearch.css" : " 7.4.5" ,
2222 "react" : " 18.1.0" ,
2323 "react-dom" : " 18.1.0" ,
24- "react-instantsearch-hooks-server" : " 6.30.2 " ,
25- "react-instantsearch-hooks-web" : " 6.30.2 "
24+ "react-instantsearch-hooks-server" : " 6.38.0 " ,
25+ "react-instantsearch-hooks-web" : " 6.38.0 "
2626 },
2727 "devDependencies" : {
2828 "@remix-run/dev" : " 1.6.5" ,
You can’t perform that action at this time.
0 commit comments