Thoughts on learning React 16 (1)

  1. Why do I write HTML in Javascript?
  2. Where does “export” export to?
  3. Why do I refer to my assets (logo.svg in this case) in App.js?
  4. Do I need to do this with all my assets?
  5. Why don’t I load the CSS from index.html (in the public folder)

React, you make no sense.

Following piece of code was copied from a new React project created with Create React App

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

class App extends Component {
  render() {
    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h1 className="App-title">Welcome to React</h1>
        <p className="App-intro">
          To get started, edit <code>src/App.js</code> and save to reload.

export default App;