Implementing Your Destini Locator via React NPM

For websites that need an asynchronous method of publishing the Destini locator and the standard install script isn't compatible, and utilizing React NPM is possible -- we offer this bare-bones module for you to install and use as an alternative method.

 

Please note that we consider this a "Beta" solution, and it may require advanced development resources on the part of the client or the client's web team to customize or otherwise make adjustments to the process outlined below to achieve successful implementation. 

 

1) NPM INSTALL

Install the Destini React NPM package (https://www.npmjs.com/package/@destini/react-locator):
npm install --save @destini/react-locator
Sample build process:
import React from 'react'

import { Locator as DestiniLocator } from '@destini/react-locator'

import '@destini/react-locator/dist/index.css'

const App = () => { return <DestiniLocator clientId='kickinghorse' /> }

export default App

2) ADDITIONAL SCRIPTS

The following JS scripts should be included on any page you are presenting a Destini locator:
<script type="text/javascript" src="//destinilocators.com/control/gtm.js"></script>
<script type="text/javascript" src="//destinilocators.com/control/pscript.js"></script>
Ideally, these scripts should be part of the page's <HEAD>

DEMO REACT MODULE


An example of these instructions implemented can be found here: https://destinidemo.com/react

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request