Can pages be used with react 18?

I’ve upgraded react to 18.2 in my project in order to use the Flowbite React UI library. But when I try to install flowbite using npm i, I get an error saying that the yext/pages package is looking for react 17. Is it possible to use yext stuff with react 18?

Hi Michael,

Yext Pages currently only supports React 17, which you can see specified in the Development Dependencies reference doc.

With the Fall '23 Release in a couple months, we will release a new version of Pages that will support React 18.

If you really want to use React 18, you can use one of our release candidates by installing the most recent version of Pages following these instructions. The update script to upgrade your Pages repo will automatically install the required dependencies for the pages upgrade:

@yext/pages@latest
@yext/sites-components@latest 
@vitejs/plugin-react@4.0.4 
vite@4.4.9

Keep in mind that if you upgrade to this latest version, there will be more changes you will need to account for once the major version is released in the Fall '23 Release.

1 Like