start : starts sample app
build : builds app
test : starts test
coverage : shows test coverage
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import store from "./store";
import MicroWebchat from "./components/microwebchat";
const sendMessage = (type, payload) => {
// When user types new message, this function will be called
};
// How to add a new messages, call this function
// msg is a json object representing one message
//
// store.dispatch({
// type: "ADD_MICROWEBCHAT_MESSAGE",
// arg: msg
// });
// How to add batch o messages
// msgs is an array of messages
//
// store.dispatch({
// type: "UPDATE_MICROWEBCHAT_MESSAGES",
// arg: msgs
// });
ReactDOM.render(
<Provider store={store}>
<MicroWebchat sendMessage={sendMessage} />
</Provider>,
document.getElementById("app")
);