一年后从 React 中走出

  • Business Highlights: Scholarly had a busy year. In 6 months, they closed first contracts. Since then, they raised a seed round, achieved SOC 2 Type II compliance, grew customer base, and expanded team.
  • Technology Stack: Remains largely consistent with Rails, Stimulus, MySQL in a server-rendered context. Use Turbo and ActionCable for interactivity. LOC shows 61k Ruby code and 4.3k JS. Cut over from React to Stimulus in August 2023.
  • Server-Rendered World: "Fat client" JS-heavy frontends may be on the way out. Server doing useful work is important. Testing is more reliable as more app becomes testable. System tests flake less. Unit testing in JS has limitations.
  • Performance: P50 route change time is 86ms and p75 is 350ms due to Turbo prefetch. No need for state management on frontend, making it fast.
  • View of JavaScript: Considered a liability. Maintaining tested code is cheaper. Changing untested JS has higher regression risk. Time investment in JS changes is more than Ruby changes.
  • Future Plans: Sticking with Stimulus and Turbo. Server-rendered, JavaScript-light approach delivers better experience. Engineers like the stack. Focus on removing other existential risks.
阅读 7
0 条评论