605 karma · joined November 8, 2017
Also they both use this_casing_style for most identifiers and ThisOne for types.
A virtual DOM allows you to use declarative _code_ instead of a string to get the same benefits as declarative HTML, but avoids the overhead of HTML by manipulating the DOM directly under the hood.
Members of the Rust community in particular are actively working in this space, building ES parsers, transpilers, and module bundlers. There's no all-in-one solution but even now with a little effort you could replace webpack with Rust-made tools, so long as you don't mind losing hot reloading or code splitting.
It's worth mentioning that if you use TypeScript, it is possible to strongly type your dispatch function to only accept valid actions. In fact TS is smart enough to type check the individual properties of different actions based on the string value of the `type` property.
You can use that with the new React Context API mentioned at the end of the article to build yourself a strongly-typed, self-contained mini redux and react-redux alternative.
Erlang is not in my opinion a “dynamic language gets us going fast” language. It's a language specifically designed to handle large scale reliably for long periods of time.
Look it's excellent for you that many people want to use your work and think it looks awesome. I am just not one of those people, for reasons developed over years of using Redux professionally.
It seems like you think I am just missing something, and that's why I don't agree with you. You should really be more open to the idea that others might think very differently from you and the people you surround yourself with, even after fully considering your ideas.
I also knew you were a Redux contributor when I first responded. I was wondering how long I could disagree with you before you pulled rank.
• "Configuring a Redux store is too complicated"
• "I have to add a lot of packages to get Redux to do anything useful"
• "Redux requires too much boilerplate code"
I can't help but point out that all of these concerns can also be solved by not using any extra libraries and just doing what I suggested.
Configuration: createStore()
Lot of packages: Not needed, just pass dispatch around.
Boilerplate code: Pretty much just combineReducers calls.
Also, I think my primary issue with redux-thunk isn't that you dispatch a non-object but that the getState argument encourages async operations which are dependent on the current store state, possibly its current state at multiple different points of time. Personally I think that as much as possible async operations should be written to use only parameters as input and dispatch actions as output.
Plus I use TypeScript where things like this getState argument are really annoying for strong typing. You need to import the type of your store or store state in every file that uses a thunk.
I also personally think that the extra ceremony applied to Redux is a contributor to the difficulty new developers have understanding it, because they believe that Redux does more than it actually does.
For example:
async function getArticle(id, dispatch) {
try {
const res = await fetch(`/articles/${id}`);
const text = await res.text();
dispatch({ type: 'GET_ARTICLE_SUCCESS', id, text });
} catch (err) {
dispatch({ type: 'GET_ARTICLE_FAILURE', id, err });
}
}
In my opinion all this middleware business (thunk, saga, etc.) is trying to make redux do jobs it isn't supposed to be doing.I wonder though if you have evaluated Crystal?
This means that if you have a problem with create-react-app or it were to be abandoned, you could just get a different development tool and likely make zero changes to your actual code.
https://www.reddit.com/r/privacy/comments/ad4h0u/duckduckgo_...
Your service may be too small for this, but a company like Amazon typically saves money overall by running a bug bounty program because uncaught bugs can be extremely expensive.
When I tell people to use Firefox they just laugh like it's a quirky personality trait that I use the underdog browser instead of the one everyone knows is best.
The way goroutines work isn't compatible with Rust's core language goal of zero-cost abstractions. In order for a goroutine to suspend and resume at arbitrary points in otherwise normal functions, each goroutine needs its own stack. This is convenient but comes at a cost, and I certainly wouldn't say that it matches reality or is close to the system.
The way Rust implements async ensures that there is zero overhead. You can think of the compiler as constructing an elaborate state machine. Each task is a normal structure in memory, just a few bytes rather than an 8 kb stack. This means that by paying the cost of dealing with a somewhat invasive language feature, Rust async code is more efficient than the equivalent Go code.
This is part of Rust's core design. The language should be as convenient or productive as possible, but never at the cost of performance or efficiency even if that cost is very small.