Skip to main content

Integrate Hoory with react.js

To integrate Hoory with your react.js application, you can install the hoory package from npm.

npm install @hoory/react

then you can import the package and use it in your application.

import React from 'react';
import { useHoory } from '@hoory/react';

export default function App() {
const API = useHoory('WEBSITE_TOKEN');
return (
<div className="App">
<button onClick={() => API.toggle() }>Toggle</button>
</div>
);
}

Full documentation is available at https://reactjs.hoory.com