repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

commit
bfbb83c
parent
27ee28d
author
Eric Bower
date
2024-03-04 14:51:49 +0000 UTC
docs: motivation
1 files changed,  +39, -2
M docs/posts/getting-started.md
+39, -2
 1@@ -5,6 +5,33 @@ description: Use starfx with deno, node, or the browser
 2 
 3 # motivation
 4 
 5+We've been sold a lie.  You think you need a react framework or server-side
 6+rendering because that's where money is being made.  If you are building a
 7+highly dynamic and interactive web application then you probably don't need
 8+SSR.  These frameworks sell you that they are an easier way to build web apps,
 9+but that's not true.  Just think of it this way: if you can build your web
10+app using only static assets, isn't that simpler than having static assets and a
11+react framework server?
12+
13+React hook-based fetching and caching libraries dramatically simplify data
14+synchronization but are so tightly coupled to a component's life cycle that
15+it creates waterfall fetches and loading spinners everywhere.  You also have
16+the downside of not being able to normalize your cache which means you have to
17+spend time thinking about how and when to invalidate your various caches that
18+hold the same API entities.
19+
20+Further, all of these data caching libraries have sold you another lie.  In
21+every library you are going to see a line similar to this: "Data normalization
22+is hard and it isn't worth it."  Wrong.  Their libraries are not built with
23+data normalization in mind so they claim it's an anti-feature.  Why do we want
24+to normalize data in the backend but not the frontend?  Data normalization is
25+critically important because it makes CRUD operations automatically update your
26+web app without having to invalidate your cache so the app will refetch the
27+data you already have.
28+
29+So what if you are building a highly interactive web app that doesn't need SEO
30+and you also need more control over data synchronization and caching?
31+
32 Are you frustrated by the following issues in your react app?
33 
34 - Prop drilling
35@@ -13,10 +40,20 @@ Are you frustrated by the following issues in your react app?
36 - Extraneous network calls
37 - Business logic tightly coupled to react component lifecycle hooks
38 - State management boilerplate
39-- Lack of data normalization
40 - Lack of async flow control tooling
41 
42-`starfx` will help with all of these common problems with modern react web apps.
43+We built `starfx` because we looked at the web app landscape and felt like
44+there was something missing.
45+
46+Do you want a library that:
47+
48+- Makes SPAs its only use case
49+- Has a powerful middleware system similar to express to handle requests and
50+  responses
51+- Makes data normalization easy and straightforward
52+- Reduces state management boilerplate to its absolute essentials
53+- Has a powerful side-effect management system using structured concurrency
54+- Has data synchronization and caching separated from react
55 
56 # when to use this library?
57