Use Woosmap Store Locator JS API in a React app

Hello Woosmapers!

We’ve built a guide on our community website to walk you through how to create a React web app using Woosmap Store Locator JS API to render a map, display your stores on top of it and display the stores attributes when a user interacts with the markers.

React is a popular JavaScript library used for building user interfaces or UI components. Although the Woosmap Store Locator JS API does not offer any npm package, you can easily integrate it in your React app.

The app features the React Hooks useEffect, useRef and useState to load the javascript files, instantiate the Map and share the selected store between components.

We hope this will give you some ideas to build your own on top of Woosmap!

Here is the sample app