Core principles - Rabsztok/arboris GitHub Wiki

  • You must use mobx-state-tree and flow() for all asynchronous operations, if any operation is not wrapped in flow(), it will run but the result will be ignored

  • You must pass your API client via MST environments; you must also create a new instance of Store per request (if you try using a global, it will leak data between requests)

  • Your API client must be able to authenticate using data that came from cookies; if you're connecting to OAuth API you need to keep access_token (and refresh_token if needed) in cookies so they're sent to the server with the request

  • Don't forget about useStaticRendering from mobx-react to avoid memory leaks

  • If you're using react-helmet, remember about renderStatic