TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What is a good React stack?

12 点作者 CraftThatBlock将近 9 年前
I&#x27;ve been trying to do this for a while, but can&#x27;t find anything &#x27;official&#x27; for this. My goal is to have a React front-end with a RESTful-style backend, with user auth.<p>What do you recommend using? React + auth is my biggest issue

10 条评论

CuriouslyC将近 9 年前
In terms of front-end, definitely go Redux. If I can toot my own horn, I suggest React&#x2F;Redux&#x2F;Radical (<a href="http:&#x2F;&#x2F;www.nathan-rice.net&#x2F;projects&#x2F;radical&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.nathan-rice.net&#x2F;projects&#x2F;radical&#x2F;</a> ); it greatly simplifies working with Redux. I also suggest Typescript, you&#x27;re already going to be on the hook with Webpack, you might as well take the small extra step and get a much better development experience.<p>As for a back-end, Postgrest is absolutely amazing. There are examples of how to implement auth with Postgrest on the official site. If you implement your application logic as stored procedures in the database, you don&#x27;t need Flask&#x2F;Django&#x2F;etc at all.
评论 #12305784 未加载
评论 #12305638 未加载
评论 #12293612 未加载
ruslan_talpa将近 9 年前
If you are going with React I suggest you go all in, i.e. React + Relay + GraphQL. In FB words &quot;While each of these technologies — React, Relay, and GraphQL — are powerful on their own, the combination is a UI platform that allows us to move fast and ship high-quality apps at scale&quot;<p>The tricky part is the GraphQL&#x2F;backend server. You can roll your sleeves and do it yourself starting form this <a href="https:&#x2F;&#x2F;github.com&#x2F;graphql&#x2F;graphql-js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;graphql&#x2F;graphql-js</a> Might also try <a href="https:&#x2F;&#x2F;github.com&#x2F;calebmer&#x2F;postgraphql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;calebmer&#x2F;postgraphql</a> (PostgREST inspired, open source but no auth and has N+1 problem)<p>I am also working on a tool&#x2F;platform that you might be interested for the backend (in beta). It is based on OpenResty&#x2F;PostgREST&#x2F;PostgreSQL and it will give you a REST and GraphQL (Relay compatible) backend with very little work. <a href="http:&#x2F;&#x2F;graphqlapi.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;graphqlapi.com&#x2F;</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;ruslantalpa&#x2F;sub0_sample_app" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ruslantalpa&#x2F;sub0_sample_app</a>
cpg1111将近 9 年前
Well fullstack Javascript is pretty common, you can use express or Koa, and passport works well for auth. Really you could use any backend and be just fine, whether it&#x27;s Python, Ruby, Go, Elixir, etc. Burger (BGR) stack is popping up lately too <a href="http:&#x2F;&#x2F;go-talks.appspot.com&#x2F;github.com&#x2F;gophercon&#x2F;2016-talks&#x2F;BenJohnson-TheBurgerStack&#x2F;main.slide#1" rel="nofollow">http:&#x2F;&#x2F;go-talks.appspot.com&#x2F;github.com&#x2F;gophercon&#x2F;2016-talks&#x2F;...</a>. Additionally things like Redux and Relay make it very nice to communicate between React and your backend. Otherwise, just speaking ajax to the backend works.
评论 #12293297 未加载
steve_taylor将近 9 年前
I use container components at the appropriate levels in the hierarchy in a similar way to Flux stores, managing their state using React&#x27;s own state management, exposing the state via context (to avoid excessive property passing). I implement actions as functions in the container components which I also expose via context. So far, I&#x27;ve found it to be simple and effective. I use page.js for routing and superagent for web service calls.
patrickgordon将近 9 年前
I used this starter kit (v2.0.0-alpha3): <a href="https:&#x2F;&#x2F;github.com&#x2F;davezuko&#x2F;react-redux-starter-kit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;davezuko&#x2F;react-redux-starter-kit</a><p>I paired it with a Rails API backend.<p>Auth handled by Auth0 and use JWT to communicate between back and front (soon to be fronts as I will be adding in an app).
andrewhayter将近 9 年前
<a href="https:&#x2F;&#x2F;github.com&#x2F;sahat&#x2F;hackathon-starter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sahat&#x2F;hackathon-starter</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;jaredpalmer&#x2F;react-production-starter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jaredpalmer&#x2F;react-production-starter</a>
hungvo将近 9 年前
Read this article for your answer <a href="https:&#x2F;&#x2F;blog.designveloper.comhttps:&#x2F;&#x2F;blog.designveloper.com&#x2F;2016&#x2F;06&#x2F;21&#x2F;react-structure-container-component-in-meteor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.designveloper.comhttps:&#x2F;&#x2F;blog.designveloper.com...</a>
rtcoms将近 9 年前
Anyone here used MobX (<a href="https:&#x2F;&#x2F;github.com&#x2F;mobxjs&#x2F;mobx" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mobxjs&#x2F;mobx</a>) ? Would like to know about pros and cons compared to redux .<p>I haven&#x27;t used any of those but would like to know about them before I start using any of those.
评论 #12295651 未加载
AlexOrtiz201将近 9 年前
Just going to put this here, <a href="https:&#x2F;&#x2F;medium.com&#x2F;javascript-scene&#x2F;passwordless-authentication-with-react-and-auth0-c4cb003c7cde#.o92147ko1" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;javascript-scene&#x2F;passwordless-authenticat...</a>
arisAlexis将近 9 年前
I found here the best combination. I am not using redux.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;coryhouse&#x2F;react-slingshot" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;coryhouse&#x2F;react-slingshot</a>