- Were going to add in Message and Messages Components, along with a stylesheet to make it a little more tolerable to look at (right now, we only really need a ‘center’ class).
- import React, { Component } from ‘react’; class App extends Component { render() { //return html } } export default App;
- /messages’; class App extends Component { render() { return (
); } } export default App;
- Passing in the chat object down to the child component is how we will be able to get our messages and map them to our Message component
- import React, { Component } from ‘react’; export default class Message extends Component { constructor(props) { super(props); this.props = props; } render() { return (
{this.props.msg.author}{this.props.msg.text}
); } }
Read the full article, click here.
@ReactiveConf: “#ReactJS, Webpack, and Horizon quick start:”
This tutorial will give you a quick start example to follow along to, and help you build a barebones React chat application with Horizon.io…
React, Webpack, and Horizon Quick Start — Frontend Weekly — Medium