react-native-sdk
react-native-sdk copied to clipboard
Better events API
Currently, we're just sending base64 strings of protobuf data for any events that include data. It's up the the SDK user to parse this data into the correct JS type (using the generated JS protobuf classes).
A better setup would be at least for the SDK to convert to the JS protobuf classes.
Even better would be to create explicit addListener
function for each type, removing the general addListener
method that takes an event type arg. So for example:
function addThreadAddedListener(listener: (thread: pb.Thread) => void)