waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
168 stars 42 forks source link

feature: @waku/react #1060

Open weboko opened 1 year ago

weboko commented 1 year ago
This is a **feature request** ## Problem

It is a moderately challenging task to use js-waku tools as they are right now in a project which is based on a web framework. Even considering js-waku-examples it is cognitively hard to keep track of edge cases while trying to integrate any of features into, let's say, React app.

Developers doing so will have to answer various questions and implement things such as:

Proposed Solutions

As an example I'll be talking about React but it applies to any other popular-enough web framework.

In order to ease things I think we should spend some time to provide:

By doing so we will:

For initial effort I would focus on the most common building block of js-waku and maybe proxy other things through @waku/react to avoid cases when consumer have version of UI lib that is not compatible with any of js-waku packages.

nb: I might be missing something and there is already a request for it or an effort going, in that case, please, share info about it.

@danisharora099 @fryorcraken

fryorcraken commented 1 year ago

Some more context: https://github.com/waku-org/js-waku-examples/pull/168/files#r1052762221

fryorcraken commented 1 year ago

IMO the biggest challenge I do not have the skills to tackle is how to handle the Waku node instance so it's started once and usable by several components.

fryorcraken commented 1 year ago

Note that having a Sender and Receiver interfaces for Relay, lightpush and filter might help creating generic component that works with relay or light nodes.

weboko commented 1 year ago

Next steps

web-chat example:

@waku/react: