repos / starfx

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

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