$ mkdir myapp
$ cd myapp
$ npm init #follow instructions - wizard app
$ git init
$ npm i express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ################### | |
// #### React hook ###### | |
// ################### | |
import { useEffect, useRef, useState } from 'react'; | |
/* eslint-disable global-require */ | |
const Places = typeof window !== 'undefined' && require('places.js'); | |
export default function useAlgoliaPlaces({ options, events }) { |