Hacker News new | past | comments | ask | show | jobs | submit login

import React from 'react'; import ReactDOM from 'react-dom';

function App(props) { return <div>Hello {props.name}</div>; }

ReactDOM.render( <App name="nichochar" />, document.getElementById('root') );

Or the alternative component API that has componentWillMount, componentDidMount, componentWillReceiveProps, shouldComponentUpdate, componentDidUpdate, componentWillUnmount, and render.

That's pretty much all there is




I believe they are complaining about the ~150kb minified filesize, rather than the API surface area.


It's under 40kb gzipped. If that's a sizeable percentage of your total JS code, you probably didn't need React in the first place.


If that's pretty much all there is, you'd be better off saving ~150kb and just using ES6 template strings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: