Autosave: 2024-06-15 11:30:03
This commit is contained in:
parent
de8ab6ec6d
commit
fae646bc33
26 changed files with 47 additions and 44 deletions
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [AWS]
|
tags:
|
||||||
|
- AWS
|
||||||
|
- procedural
|
||||||
---
|
---
|
||||||
|
|
||||||
# AWS CLI frequent commands
|
# AWS CLI frequent commands
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
- AWS
|
||||||
---
|
---
|
||||||
|
|
||||||
# AWS SAM and Docker
|
# AWS SAM and Docker
|
||||||
|
|
|
@ -6,7 +6,7 @@ tags:
|
||||||
|
|
||||||
# Application state management
|
# Application state management
|
||||||
|
|
||||||
Although [useReducer](useReducer.md) and [useContext](useContext.md) have
|
Although [React_useReducer](React_useReducer.md) and [React_useContext](React_useContext.md) have
|
||||||
many sound use cases by themselves, when they are combined they offer a way to
|
many sound use cases by themselves, when they are combined they offer a way to
|
||||||
acheive a system of global state management, without utilising third-party
|
acheive a system of global state management, without utilising third-party
|
||||||
libraries like Redux.
|
libraries like Redux.
|
||||||
|
@ -47,7 +47,7 @@ export const CounterContext = React.createContext({});
|
||||||
|
|
||||||
Now we need a reducer that will handle the state updates. We will just use the
|
Now we need a reducer that will handle the state updates. We will just use the
|
||||||
same setup as we used in the example of
|
same setup as we used in the example of
|
||||||
[useReducer](useReducer.md#refining-the-syntax):
|
[React_useReducer](React_useReducer.md#refining-the-syntax):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function reducer(state, action) {
|
function reducer(state, action) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
|
- operating-systems
|
||||||
|
- Linux
|
||||||
---
|
---
|
||||||
|
|
||||||
# Basic model of a \*nix operating system
|
# Basic model of a \*nix operating system
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
tags:
|
|
||||||
- shell
|
|
||||||
---
|
|
||||||
|
|
||||||
# Best practices
|
|
||||||
|
|
||||||
https://sharats.me/posts/shell-script-best-practices/
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Biconditional Elimination
|
# Biconditional Elimination
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Biconditional introduction
|
# Biconditional introduction
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: []
|
tags:
|
||||||
|
- networks
|
||||||
|
- procedural
|
||||||
|
- Linux
|
||||||
---
|
---
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
---
|
---
|
||||||
tags: [propositional-logic, algebra, nand-to-tetris]
|
tags:
|
||||||
|
- propositional-logic
|
||||||
|
- algebra
|
||||||
|
- nand-to-tetris
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Boolean algebra
|
# Boolean algebra
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: [propositional-logic, nand-to-tetris]
|
tags:
|
||||||
|
- propositional-logic
|
||||||
|
- nand-to-tetris
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Boolean function synthesis
|
# Boolean function synthesis
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
---
|
---
|
||||||
tags: [propositional-logic, nand-to-tetris]
|
tags:
|
||||||
|
- propositional-logic
|
||||||
|
- nand-to-tetris
|
||||||
|
- logic
|
||||||
---
|
---
|
||||||
|
|
||||||
# Boolean functions
|
# Boolean functions
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- disks
|
- disks
|
||||||
|
- operating-systems
|
||||||
---
|
---
|
||||||
|
|
||||||
# The boot process
|
# The boot process
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [bus]
|
tags:
|
||||||
|
- bus
|
||||||
|
- computer-architecture
|
||||||
---
|
---
|
||||||
|
|
||||||
# Bus
|
# Bus
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
id: 81vp
|
|
||||||
title: Change_DNS_server
|
|
||||||
tags: [procedural]
|
|
||||||
created: Saturday, June 08, 2024
|
|
||||||
---
|
|
||||||
|
|
||||||
# Change_DNS_server
|
|
||||||
|
|
||||||

|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [motherboard]
|
tags:
|
||||||
|
- hardware
|
||||||
|
- computer-architecture
|
||||||
---
|
---
|
||||||
|
|
||||||
# Chipset and controllers
|
# Chipset and controllers
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Forms using hooks
|
# Forms using hooks
|
||||||
|
|
||||||
With hooks, form processing is exactly the same as
|
With hooks, form processing is exactly the same as
|
||||||
[classes](Forms.md) in terms of the overall
|
[classes](Forms_in_React.md) in terms of the overall
|
||||||
methodology, but the syntax is slightly different as a result of the `useState`
|
methodology, but the syntax is slightly different as a result of the `useState`
|
||||||
hook.
|
hook.
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Iterating through data
|
# Iterating through data
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Memoization with useCallback and useMemo
|
# Memoization with useCallback and useMemo
|
||||||
|
@ -69,7 +68,7 @@ const handleSubmit = useCallback(
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the syntax is similar to [useEffect](useEffect.md): there is a
|
Note that the syntax is similar to [React_useEffect](React_useEffect.md): there is a
|
||||||
dependency array. The effect is the same: the function contained within
|
dependency array. The effect is the same: the function contained within
|
||||||
`useCallback` will only re-rendered if one of these dependencies changes.
|
`useCallback` will only re-rendered if one of these dependencies changes.
|
||||||
However (see next section) the function will run in its memoized form on every
|
However (see next section) the function will run in its memoized form on every
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [memory, motherboard]
|
tags:
|
||||||
|
- memory
|
||||||
|
- computer-architecture
|
||||||
---
|
---
|
||||||
|
|
||||||
# Memory
|
# Memory
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
tags: [motherboard]
|
tags:
|
||||||
|
- hardware
|
||||||
|
- computer-architecture
|
||||||
---
|
---
|
||||||
|
|
||||||
# Motherboard
|
# Motherboard
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Errors
|
# Errors
|
||||||
|
@ -18,4 +17,4 @@ Once the data is returned, React tries to update the state but the component is
|
||||||
unmounted.
|
unmounted.
|
||||||
|
|
||||||
As the warning suggests, this can be resolved using the cleanup parameter within
|
As the warning suggests, this can be resolved using the cleanup parameter within
|
||||||
[useEffect](useEffect.md#cleanup-functions).
|
[React_useEffect](React_useEffect.md#cleanup-functions).
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# `useContext`
|
# `useContext`
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# `useEffect`
|
# `useEffect`
|
||||||
|
@ -81,7 +80,7 @@ recasts the traditional [lifecycle methods](Lifecycle_methods.md))
|
||||||
effect runs again (i.e. when it runs in response to a change in one of the
|
effect runs again (i.e. when it runs in response to a change in one of the
|
||||||
elements of the dependency araray). This is chiefly used to prevent
|
elements of the dependency araray). This is chiefly used to prevent
|
||||||
[memory leaks](Memory_leaks.md) and the
|
[memory leaks](Memory_leaks.md) and the
|
||||||
['update on unmounted component error'](Errors.md#state-update-on-unmounted-component).
|
['update on unmounted component error'](React_errors.md#state-update-on-unmounted-component).
|
||||||
|
|
||||||
You do this by having a `return` clause after the main effect. Schematically:
|
You do this by having a `return` clause after the main effect. Schematically:
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# `useReducer`
|
# `useReducer`
|
||||||
|
|
||||||
The `useReducer` hook is best used in scenarios where you are manipulating state
|
The `useReducer` hook is best used in scenarios where you are manipulating state
|
||||||
in a way that is too complex for the trivial [useState](useState.md) use case.
|
in a way that is too complex for the trivial [React_useState](React_useState.md) use case.
|
||||||
`useState` is best employed when you are updating a single value or toggling a
|
`useState` is best employed when you are updating a single value or toggling a
|
||||||
boolean. If you are updating the state of an object or more complex data
|
boolean. If you are updating the state of an object or more complex data
|
||||||
structure, it is often more efficient to employ `useReducer`.
|
structure, it is often more efficient to employ `useReducer`.
|
|
@ -2,7 +2,6 @@
|
||||||
tags:
|
tags:
|
||||||
- javascript
|
- javascript
|
||||||
- react
|
- react
|
||||||
- react-hooks
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# `useState`
|
# `useState`
|
Loading…
Add table
Reference in a new issue