react-book icon indicating copy to clipboard operation
react-book copied to clipboard

Backend Chapter

Open bebraw opened this issue 10 years ago • 1 comments

Discuss how to integrate with backends. Ie. REST, Firebase. Example based on https://github.com/goatslacker/alt/issues/158 and https://github.com/goatslacker/alt/pull/173 below (not sure if correct):

const alt = new Alt({ stateKey: 'state' })

class Foo {
  static displayName: 'FooStore'

  constructor() {
    // private, use this to talk with firebase
    this.firebase = new Firebase();

    // state shared with components and modified by firebase instance
    this.state = {
      state1: 1,
      state2: 2
    }
  }
}

bebraw avatar Jul 01 '15 05:07 bebraw

This will be a great chapter. Should hear more news about Relay over the next days from React-Europe. Would love to learn all about Firebase with and without Relay integration and also with and without Alt.

HighOnDrive avatar Jul 01 '15 14:07 HighOnDrive