Dear Community,
I want to start by sincerely apologizing for the unintended breach of privacy and security that occurred recently. It has come to my attention that in my pursuit of a project, I inadvertently exposed sensitive information—namely, everyone’s SSN numbers. This is
Five years ago, a simple 'Hello World' in React was straightforward. Now, it feels like understanding the universe's creation story is easier than grasping React's server-first approach.
What happened?
accidentally broke NPM and all I got was this sweet permanent banner all over my Github
(thats impossible to remove since they probably had to code it up last minute before removing the org/repo)
Angular Server Services (the ng version of RSC): latest update.
done:
* client and server batch Server Services requests
(you won't need GraphQL anymore)
* using Angular di and TransferState
* Better more ideal API than original demo
next:
* Angular Server Components
*
@Steve8708
haha cache it after first thing generates and dep track (tags) to know when to recompute and update the cache that way to can set how long before it should recompute (when traffic is high cache longer etc)
By the end of 2024, you’ll likely never need these APIs again:
• useMemo, useCallback, memo → React Compiler
• forwardRef → ref is a prop
• React.lazy → RSC, promise-as-child
• useContext → use(Context)
• throw promise → use(promise)
• <Context.Provider> → <Context>
@BHolmesDev
The reason why it’s confusing is because there are two ways to look at it.
Short-lived apps and long-lived apps. Anything short-lived requires fast loading and usually a new user not returning.
Long lived is a returning user. Long lived also doesn’t care about faster initial
htmx: backend devs learning frontend
actions: frontend devs learning backend
* Both sides will eventually discover pitfalls that the other solved already.
* Both didn’t like the status quo.
* Both don’t understand each other and why the other likes their patterns vs theirs.
ESM was released a decade ago.
Stop keeping .CJS alive.
This is how we kept IE alive. IE made sense because it’s customer facing and devices. CJS is just because devs supporting it for no reason and thinking they should
Imagine if you had a REST API that does every advanced feature:
* consistent data shape client/server via schema
* only one version
* one API call per page
* pagination
* validation
* introspection
* authorization
* platform agnostic
* real-time
* has a Spec
That's
#GraphQL
@codewithvoid
Using ChatGPT.
Creating a whiteboard like session on my PoC code. Asking it to teach me certain parts of the codebase that uses libs I’m not familiar with. Asking it about a API and different ways I can use it for what I need. Etc
REST: 1 page 3 resources 3 API calls
GraphQL: 1 page 3 resources 1 API call
REST: Get everything for each resource
GraphQL: Get only what you need
REST: Requires documenting
GraphQL: Self-documenting
REST: Proprietary
GraphQL: Standard
Im finally releasing my own framework called Patrick.js
Benefits include:
* zero hydration
* no-build
* no-bundles
* resuming always
* ssr/ssg/csr options
* all edge compatible
* used for long-lived-apps and short-lived-apps
* always high lighthouse
* less JavaScript more
@Austen
const S = (n) => () => n + 1;
let zero = 0;
let one = S(zero)();
let two = S(one)();
const add = (a, b) => (b === zero) ? a : S(add(a, b - 1))();
add(two, two) === 4;
This is why React is still king of js frameworks. Even though they develop for internal requirements they still care about the community and will pause a release to address the community only issues
@TkDodo
good news re Suspense, just met w/
@rickhanlonii
@en_JS
@acdlite
* we care a lot about SPAs, team misjudged how many people rely on this today
* still recommend preloading but recognize not always practical
* we plan to hold the 19.0 release until we find a good fix
more to come
Angular Server Services demo:
generate RPC for services that only live on the server. which allows you to delete all your services code on the client.
cc
@brandontroberts
@angular