- Jun 2020
-
pubs.opengroup.org pubs.opengroup.org
-
An Idiom is a low-level pattern specific to a programming language. An idiom describes how to implement particular aspects of components or the relationships between them using the features of the given language.
-
A Design Pattern provides a scheme for refining the subsystems or components of a software system, or the relationships between them. It describes a commonly recurring structure of communicating components that solves a general design problem within a particular context.
-
Building blocks are what you use: patterns can tell you how you use them, when, why, and what trade-offs you have to make in doing so.
-
patterns are considered to be a way of putting building blocks into context
-
A "pattern" has been defined as: "an idea that has been useful in one practical context and will probably be useful in others"
-
- May 2020
-
medium.com medium.com
-
search engines and social networks presence
More issues with client-side rendered app
-
the end user is using a slow internet connection, especially mobile connection,the end user is running an underpowered device, for example an older generation mobile device,
Web applications rendered mostly/fully by JS will become an issue if the target demographic falls into one of these two groups.
-
-
reactjs.org reactjs.org
-
functional update form of setState. It lets us specify how the state needs to change without referencing the current state
For effects that require updating frequent-changing states, use the functional update form of setState to avoid getting into infinite loops.
-
typically you want to modify refs in event handlers and effects
Avoid setting refs during rendering
-
-
-
only the assigned variable name addVariable can be used to refer & execute it.
Named function defined via function expression cannot be called with its name but the variable name it is assigned to, except for the function calling itself.
-
addFunction overshadows the addVariable in call stack of debugging tools.
Assigning name to function defined in function expression results in seeing the name shown in the call stack during debugging, instead of the variable name it is assigned to.
-
-
reactjs.org reactjs.org
-
a DOM mutation that is visible to the user must fire synchronously before the next paint so that the user does not perceive a visual inconsistency. (The distinction is conceptually similar to passive versus active event listeners.) For these types of effects, React provides one additional Hook called useLayoutEffect
useLayoutEffect() is the counterpart to useEffect() that is meant for using with the types of work that cannot be deferred. Effects defined using useLayoutEffect get fired synchronously before the next paint.
-
This makes it suitable for the many common side effects, like setting up subscriptions and event handlers, because most types of work shouldn’t block the browser from updating the screen.
useEffect() is for using with the types of work that shouldn't block the browser from updating the screen.
-
-
legacy.reactjs.org legacy.reactjs.org
-
Note that a HOC doesn’t modify the input component, nor does it use inheritance to copy its behavior. Rather, a HOC composes the original component by wrapping it in a container component. A HOC is a pure function with zero side-effects.
The essence of the decorator pattern.
-
- Apr 2018
-
www.sarahmei.com www.sarahmei.com
-
The takeaway from the article: Choose document-oriented database only when the data can be treated as a self-contained document
-
-
martinfowler.com martinfowler.com
-
The baseline here is detecting technical issues (counting errors, service availability, etc) but it's also worth monitoring business issues (such as detecting a drop in orders).
-
- Dec 2017
-
-
The number of transactions the blockchain can process can never exceed that of a single node that is participating in the network.
Not sure if I understand this correctly. Does this mean the number of transactions that a blockchain-powered network can process is equivalent to the number of transactions that the slowest node in the network can process? If so, I haven't heard such limitation.
-