11# React Live Chat Loader
22
33<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45[ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square )] ( #contributors- )
6+
57<!-- ALL-CONTRIBUTORS-BADGE:END -->
68
7- [ ![ Contributor Covenant] ( https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg )] ( CODE_OF_CONDUCT.md )
9+ [ ![ Contributor Covenant] ( https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg )] ( CODE_OF_CONDUCT.md )
810
911An npm module that allows you to mitigate the negative performance and user
1012experience impact of chat tools. ` react-live-chat-loader ` shows a fake widget
@@ -22,7 +24,7 @@ Made by the team at [♠ Calibre](https://calibreapp.com/), your performance com
22246 . [ Contributing] ( #-contributing )
23257 . [ Examples] ( #-examples )
2426
25- ## 💡 How it Works
27+ ## 💡 How it Works
2628
2729Chat widgets rely heavily on JavaScript which comes at a cost. Given the
2830significant impact that comes from the download, parse, compile and execution of
@@ -40,7 +42,7 @@ connection (using `navigator.connection.effectiveType`) or has data-saver enable
4042
4143> ⚠️ ** Please note** : Some chat widget providers open automatically based on the people’s interaction from their last session.
4244
43- ## 📥 Installation
45+ ## 📥 Installation
4446
4547To download react-live-chat-loader run:
4648
@@ -126,6 +128,8 @@ You can pass the following props to the `LiveChatLoaderProvider` provider:
126128- ` idlePeriod ` : How long to wait in ms before loading the provider. Default is
127129 ` 2000 ` . Set to ` 0 ` to never load. This value is used in a ` setTimeout ` in
128130 browsers that don't support ` requestIdleCallback ` .
131+ - ` beforeInit ` : A function to be called after the script has loaded, but before the chat provider has been initialized (optional)
132+ - ` onReady ` : A function to be called once the script has been loaded, the chat provider has been initialized and is ready for use (optional)
129133
130134## 💬 Supported Providers
131135
@@ -338,9 +342,11 @@ You can customise the Chatwoot Widget by passing the following props to the
338342</details >
339343
340344## ➕ Adding a Provider
345+
341346To add a new live chat provider, follow the steps in [ Contributing: Adding a Provider] ( CONTRIBUTING.md#-adding-a-provider ) .
342347
343348## 🙌 Contributing
349+
344350Happy to hear you’re interested in contributing to React Live Chat Loader! Please find our contribution guidelines [ here] ( CONTRIBUTING.md ) .
345351
346352## 🖥️ Examples
@@ -352,7 +358,7 @@ Happy to hear you’re interested in contributing to React Live Chat Loader! Ple
352358- [ How to avoid performance regressions when using live chat tools] ( https://calibreapp.com/blog/fast-live-chat )
353359- [ Reducing the Intercom Messenger bundle size by 65%] ( https://www.intercom.com/blog/reducing-intercom-messenger-bundle-size/ )
354360
355- ## ✨ Contributors
361+ ## ✨ Contributors
356362
357363Thanks goes to these wonderful people ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
358364
0 commit comments