npm.io
0.4.0 • Published 5 years ago

react-chat-potato

Licence
MIT
Version
0.4.0
Deps
2
Size
36 kB
Vulns
2
Weekly
0
Stars
3

Chat Potato default Banner

A fun project, that tries to take a different approach from community loved react-native-gifted-chat when handling state and actions.

Only dependecies (hopefully) are:

Get Started

Currently without Typescript support, to use the package

yarn add react-chat-potato

And follow through the Usage section

Underlying Concepts and Principles

Concepts:

Building this project, there are differnent things that are taken to consideration when building a chat. It's that:

  • You want to know the information around the general conversation (global context)
  • You want to be able to show messages accounting for different types (text, images, videos, signature, whatever else that might popup in the future...)
  • You want to be able to use different inputting methods for different types of data

This packages tries to get close to addressing some these things by building around having 3 things, which are being internally supported within this project:

  • Global Context
  • MessageCanvas
  • ComposerBox

Global-MessageCanvas-ComposerBox

(...more on these later)

Principles:

  • Modularity and high customizability (using inner component through use of hooks)
  • Nothing is served for primary use (though there are things that are provided as example components)
  • Can be used with both React and ReactNative environments

Things to try to play around with:

(I should probably move this to Github Project)

  • Enabling Customizable Composers: You are able to build composer components depending on your use case. For instance: text area for text input, custom audio mic for audio input. See Usage example

  • Using delta datetime [on progress] (and having only one reference for time)

  • publish version 0.1.x (current 0.3.x)

  • Wrapping with placeholder view component (not to pick sides btn RJS / RN)

  • Adding a default components package with theme

  • Support Typescript

Example Usage

Here is an example project using react-chat-potato:

License

This project uses an MIT License. So take it apart, build it. Do whatever you want with this project.

But Contributions are welcomed