@qite/tide-booking-component
v1.4.124
Published
React Booking wizard & Booking product component for Tide
Downloads
5,161
Readme
README
This is the unified Tide Booking component.
Setup
- Use Node version 20 (an
.nvmrcis present; if you use fnm or nvm, your shell should pick it up automatically). - Install node modules at the repo root:
npm ci - Install node modules in the playground:
cd playground && npm ci --legacy-peer-deps- The
--legacy-peer-depsflag is required because[email protected](CRA, end-of-life) declares peer-dep compatibility only up to TypeScript 4.x, while this repo's lockfile pins TS 5.x. The lockfile is fine; the declared constraint is stale. Without the flag npm 7+ refuses to install.
- The
- Start the playground:
cd playground && npm start - (One-time) After installing playground node modules, run
npm link ./playground/node_modules/reactat the repo root to avoid the React duplicate-hook warning.
Remarks
Do not forget to sync React versions when you're doing local changes and when you try to test them in a local React project (check https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react).
If using the playground, after installing its node modules, execute the following command in the root folder npm link ./playground/node_modules/react
Use of the package
When using booking-wizard in a gatsby v5 website do following steps
- Use react v20 and react-router-dom@6
- Import only @runtime (otherwise signalr-no-query gives an error an window)
- Surround with a to handle the internal routing
- Set 'skipBasePathInRouting' to true in the settings to avoid duplicate basepaths in the internal routing.
