Next.js Integration
See original GitHub issueI would appreciate a definitive guide on using this with next.js. The Next.js script tag with a beforeInteractive strategy gives the error use-places-autocomplete: Google Maps Places API library must be loaded.
The native script tag only works with asynchronous loading since external synchronous scripts are forbidden in Next.js. asynchronously loading the script occasionally freezes the input field.
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:9
Top Results From Across the Web
Advanced Features: Custom Server - Next.js
A custom Next.js server allows you to start a server 100% programmatically in order to use custom server patterns. Most of the time,...
Read more >Testing | Next.js
Learn how to set up Next.js with three commonly used testing tools — Cypress, Playwright, Jest, and React Testing Library.
Read more >Getting Started | Next.js
Get started with Next.js in the official documentation, and learn more about all our features!
Read more >next/server - Next.js
next /server provides server-only helpers for use in Middleware and Edge API Routes. NextRequest. The NextRequest object is an extension of the native...
Read more >Deployment - Next.js
This document will show how to deploy either managed or self-hosted using the Next.js Build API. Next.js Build API. next build generates an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Per the recent Nextjs shift in best practices for loading beforeInteractive scripts, you can instantiate the library as pictured and it works perfectly. I’m using next@latest, edge middleware, etc etc; works with next@12.x.x
if anyone has tips for using the returned latlng values with Algolia InstantSearch Hooks it’d be much appreciated. I currently have it all working in isolation; but when using both Google places and algolia in the same form the fetching strategies clash I think (fiddling with Promise.all([]) but might say fuck it and use global context, keep the worlds separate).
That said, it would be dope to see an algolia-instantsearch-hooks use places autocomplete integration
@paularah By using use-google-maps-script package you can wait until script is loaded then call your address component.