title: REST (HATEOAS) and ReactJS
body: <p>I'm interested in using the <a href="https://spring.io/projects/spring-hateoas" rel="nofollow noreferrer">HATEOAS</a> principle of REST to reduce business logic in a SPA application.  In a React-specific context, I'd like to know if there are challenges that make this impractical and, if not, what is a good strategy to follow?</p>
  <p>Conceptual examples of using HATEOAS to remove business logic from the UI:</p>
  <ul>
  <li><a href="http://restcookbook.com/Basics/hateoas/" rel="nofollow noreferrer">Delegating valid bank account actions to the REST service</a></li>
  <li><a href="http://www.codeproject.com/Articles/1081859/Don-t-Hate-The-HATEOAS" rel="nofollow noreferrer">Delegating role-based access control to the REST service</a></li>
  </ul>
  <p>I've only found one link that suggests <a href="https://stackoverflow.com/questions/30404588/flux-how-to-make-an-action-wait-for-a-store?utm_content=buffer10376&amp;utm_medium=social&amp;utm_source=plus.google.com&amp;utm_campaign=buffer">React/Flux is not compatible with a HATEOAS strategy</a>, and no meaningful discussion elsewhere.  Is it really not feasible in a React/Flux app? That SO post didn't get enough attention.  Does anyone have a favorite or recommended approach for achieving success (with or without Flux or Redux)?</p>
  <p>Someone gave a fairly detailed example of <a href="https://stackoverflow.com/questions/28926483/single-page-application-and-restful-api">leveraging HATEOAS in the context of Angular</a>.  I'm looking for something similar for React.</p>
  <p>Personally, I'm picturing the <code>rel</code> tag in hypermedia links controlling which JSX components are rendered (<a href="https://facebook.github.io/react/tips/if-else-in-JSX.html" rel="nofollow noreferrer">conditional JSX</a>).  Is that naive for a real-world React app?  Perhaps conditionally rendered React components are too coarse-grained to be used this way?</p>
  <p>I am assuming that hypermedia links are provided by a <a href="http://stateless.co/hal_specification.html" rel="nofollow noreferrer">HAL</a> implementation, or otherwise conform to the ATOM feed convention (<a href="https://www.rfc-editor.org/rfc/rfc4287" rel="nofollow noreferrer">RFC4287</a>).</p>