422632 (1) [Avatar] Offline
#1
It's not a huge deal, but when you copy the code from the liveBook, many of the quotes are smart quotes and cause an error when you run the program. For example, see line 11 below from chapter 2.

class MainComponent extends Component {
  constructor() {
    super()
    this.state = { loading: true, data: {} }
  }
  componentDidMount() {
    // simulate ajax call
    setTimeout(() => {
      this.setState({
        loading: false,
        data: {name: ‘Nader Dabit’, age: 35}
      })
    }, 2000)
  }
  render() {
    if(this.state.loading) {
      return <Text>Loading</Text>
    }
    const { name, age } = this.state.data
    return (
      <View>
        <Text>Name: {name}</Text>
        <Text>Age: {age}</Text>
      </View>
    )
  }
}