- Alejando Serrano (47 Degrees)
- Searching for one ;)
I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
SELECT | |
form_factor.name AS form_factor, | |
cls.start, | |
ROUND(SUM(cls.density), 4) AS density | |
FROM | |
`chrome-ux-report.all.201905`, | |
UNNEST(experimental.cumulative_layout_shift.histogram.bin) AS cls | |
WHERE | |
origin = 'https://www.nytimes.com' | |
GROUP BY |
9 March, 2019
We were discussing with @erusev what we can do with async operation when using useReducer()
in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer()
. The problem we are facing and don't know how to solve is async operations.
In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.
While the public API intended for users to use is the scheduler
package, the reconciler currently
does not use scheduler
's priority classes internally.
ReactFiberScheduler
has its own internal "mini-scheduler" that uses the scheduler
package
indirectly for its deadline-capable scheduleCallback.
This is kind of a documentation of implementation details that I suppose will be gone by the end of the year, but what can you do.
import React from 'react'; | |
class Counter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { counter: 0 }; | |
this.increment = this.increment.bind(this); | |
} | |
increment() { |
This is the final part of a series about Algebraic Effects and Handlers.
So we've come to the core topic. The reality is that we've already covered most of it in the previous parts. Especially, in the third part, where we saw delimited continuations at work.
This is the second part of a series about Algebraic Effects and Handlers.
Note: initially I planned a 3-part series, but since the current post on undelimited continuations ended up taking
This is the first post of a series about Algebraic Effects and Handlers.
There are 2 ways to approach this topic:
Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra. On the other hand, the operational approach is accessible to a much wider audience of programmers even if it doesn't provide the full picture.