FastComments.com Blog
follow us in feedly
Fri Oct 14 2022 -
...

Add Live Chat to Native Applications With FastComments React Native

! This Article Contains Technical Jargon

What's New

At FastComments, we've launched a new way to build React Native applications with FastComments. Previously, you would use our react-native wrapper around the VanillaJS library. This introduced several memory and latency issues due to requiring a web view - a browser in your app - just to load our library.

We have now completely ported FastComments to React Native, and wrote our own WYSIWYG editor to completely eliminate the need for web views.

The library supports different skins and layouts. For example, here's the Erebus skin which is a live-chat style dark skin:

Erebus Skin

The library is available on GitHub at FastComments/fastcomments-react-native-sdk as well as on NPM.

Customizable

The new native library is designed to be customizable just like the existing web library.

You can:

  • Customize all assets and icons the library uses.
  • Customize the styling of every component in the library by passing in a Styles object from the top.
  • Customize all translations.
  • Use one of the predefined or community developed skins.
  • Use many of the same configuration options the web library supports.

Complete Feature List

The library supports many things. An incomplete list is:

  • Blocking
  • Chat Reactions
  • Child Comments & Replies
  • Custom Styles (as typed stylesheet)
  • Emoticons
  • Flagging
  • Gif Browser - With default trending + search capability. Images and searching anonymized by proxy.
  • Live commenting
  • Media Selection & Uploads
  • Native WYSIWYG editor with image support.
  • Notification Service (get user's unread notifications in the background to push to them, etc)
  • Notifications List (shows when clicking bell). Supports subscriptions.
  • Pagination (Buttons)
  • Pagination (Infinite Scroll)
  • Pinning Comments
  • Secure, Simple SSO, and anonymous commenting.
  • Several predefined skins.
  • Show/Hide Comments Toggle
  • Threads
  • User activity indicators
  • Voting

How it Works

The library is a complete rewrite of the FastComments client in TypeScript and React Native.

Long Term Plan

Long term, we will maintain both the VanillaJS library and the react-native library in parallel, as well as any future native libraries we may develop.

What's Next?

We will look forward to feedback from users and the community to improve this library over time, just as we have done with the web ecosystem.

In Conclusion

We know this library has been long awaited by some. Like all major releases, we're glad that we could take the time to optimize, test, and properly release this library.

Cheers!