422632 (2) [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>
    )
  }
}
Marina Michaels (47) [Avatar] Offline
#2
Thank you for reporting this. I've passed this information on to one of the people working on liveBooks.

Meanwhile, can you access the author's repo and get the code from there?
422632 (2) [Avatar] Offline
#3
I just corrected the quotes. It wasn't a huge problem.