From b9dfb77d067b417258d5ef9870a0f658ee89985e Mon Sep 17 00:00:00 2001 From: Morgan Ney Date: Fri, 13 Dec 2024 22:42:44 -0600 Subject: [PATCH] docs: update. (#91) --- README.md | 14 +++++++++++++- packages/tts-react/README.md | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 391a226..2733eaa 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,21 @@ Repository for `tts-react`, a React component and hook that uses the [`SpeechSynthesis`](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis) and [`SpeechSynthesisUtterance`](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance) API's to convert text to speech. You can fallback to the [`HTMLAudioElement`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio) API by providing a `fetchAudioData` prop to the hook or component. +> [!IMPORTANT] +> Requires a peer dependency of React and ReactDOM >= 19. +> Use `tts-react@3` if your project is on React 18. + ## Install -`npm i react react-dom tts-react` +```console +npm i react react-dom tts-react +``` + +For projects using React 18: + +```console +npm i react@18 react-dom@18 tts-react@3 +``` ## Table of Contents diff --git a/packages/tts-react/README.md b/packages/tts-react/README.md index b2aca00..0b8a372 100644 --- a/packages/tts-react/README.md +++ b/packages/tts-react/README.md @@ -12,7 +12,15 @@ By default `tts-react` uses the [`SpeechSynthesis`](https://developer.mozilla.or ## Install -`npm i react react-dom tts-react` +```console +npm i react react-dom tts-react +``` + +For projects using React 18: + +```console +npm i react@18 react-dom@18 tts-react@3 +``` ## Demo (Storybook) @@ -34,9 +42,9 @@ Get up and running quickly using `tts-react` with ESM from a CDN. This example u