From fae646bc33a761f4634d03c50fc8c9ab5516ce5d Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sat, 15 Jun 2024 11:30:03 +0100 Subject: [PATCH] Autosave: 2024-06-15 11:30:03 --- zk/AWS_CLI.md | 4 +++- zk/AWS_SAM_and_Docker.md | 1 + zk/Application_state_management_with_React_hooks.md | 4 ++-- zk/Basic_Model.md | 2 ++ ..._prop_passing.md => Basic_prop_passing_in_React.md} | 0 zk/Best_practices.md | 8 -------- zk/Biconditional_Elimination.md | 3 ++- zk/Biconditional_Introduction.md | 3 ++- zk/Bluetooth.md | 5 ++++- zk/Boolean_algebra.md | 6 +++++- zk/Boolean_function_synthesis.md | 5 ++++- zk/Boolean_functions.md | 5 ++++- zk/Boot_process.md | 1 + zk/Bus.md | 4 +++- zk/Change_DNS_server.md | 10 ---------- zk/Chipset_and_controllers.md | 4 +++- zk/{Forms.md => Forms_in_React.md} | 3 +-- zk/{Iterating.md => Iterating_in_React.md} | 1 - zk/{Memoization.md => Memoization_in_React.md} | 3 +-- zk/Memory.md | 4 +++- zk/Motherboard.md | 4 +++- zk/{Errors.md => React_errors.md} | 3 +-- zk/{useContext.md => React_useContext.md} | 1 - zk/{useEffect.md => React_useEffect.md} | 3 +-- zk/{useReducer.md => React_useReducer.md} | 3 +-- zk/{useState.md => React_useState.md} | 1 - 26 files changed, 47 insertions(+), 44 deletions(-) rename zk/{Basic_prop_passing.md => Basic_prop_passing_in_React.md} (100%) delete mode 100644 zk/Best_practices.md delete mode 100644 zk/Change_DNS_server.md rename zk/{Forms.md => Forms_in_React.md} (98%) rename zk/{Iterating.md => Iterating_in_React.md} (99%) rename zk/{Memoization.md => Memoization_in_React.md} (98%) rename zk/{Errors.md => React_errors.md} (90%) rename zk/{useContext.md => React_useContext.md} (99%) rename zk/{useEffect.md => React_useEffect.md} (97%) rename zk/{useReducer.md => React_useReducer.md} (97%) rename zk/{useState.md => React_useState.md} (99%) diff --git a/zk/AWS_CLI.md b/zk/AWS_CLI.md index 9c7fa11..248d185 100644 --- a/zk/AWS_CLI.md +++ b/zk/AWS_CLI.md @@ -1,5 +1,7 @@ --- -tags: [AWS] +tags: + - AWS + - procedural --- # AWS CLI frequent commands diff --git a/zk/AWS_SAM_and_Docker.md b/zk/AWS_SAM_and_Docker.md index c170591..175382c 100644 --- a/zk/AWS_SAM_and_Docker.md +++ b/zk/AWS_SAM_and_Docker.md @@ -1,6 +1,7 @@ --- tags: - docker + - AWS --- # AWS SAM and Docker diff --git a/zk/Application_state_management_with_React_hooks.md b/zk/Application_state_management_with_React_hooks.md index 30283b7..ef45cf2 100644 --- a/zk/Application_state_management_with_React_hooks.md +++ b/zk/Application_state_management_with_React_hooks.md @@ -6,7 +6,7 @@ tags: # 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 acheive a system of global state management, without utilising third-party 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 same setup as we used in the example of -[useReducer](useReducer.md#refining-the-syntax): +[React_useReducer](React_useReducer.md#refining-the-syntax): ```js function reducer(state, action) { diff --git a/zk/Basic_Model.md b/zk/Basic_Model.md index 5c66bab..d629809 100644 --- a/zk/Basic_Model.md +++ b/zk/Basic_Model.md @@ -1,5 +1,7 @@ --- tags: + - operating-systems + - Linux --- # Basic model of a \*nix operating system diff --git a/zk/Basic_prop_passing.md b/zk/Basic_prop_passing_in_React.md similarity index 100% rename from zk/Basic_prop_passing.md rename to zk/Basic_prop_passing_in_React.md diff --git a/zk/Best_practices.md b/zk/Best_practices.md deleted file mode 100644 index fa5710a..0000000 --- a/zk/Best_practices.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -tags: - - shell ---- - -# Best practices - -https://sharats.me/posts/shell-script-best-practices/ diff --git a/zk/Biconditional_Elimination.md b/zk/Biconditional_Elimination.md index 1876462..d50a134 100644 --- a/zk/Biconditional_Elimination.md +++ b/zk/Biconditional_Elimination.md @@ -1,5 +1,6 @@ --- -tags: [] +tags: + - logic --- # Biconditional Elimination diff --git a/zk/Biconditional_Introduction.md b/zk/Biconditional_Introduction.md index f5d1805..eb81aef 100644 --- a/zk/Biconditional_Introduction.md +++ b/zk/Biconditional_Introduction.md @@ -1,5 +1,6 @@ --- -tags: [] +tags: + - logic --- # Biconditional introduction diff --git a/zk/Bluetooth.md b/zk/Bluetooth.md index af48ad2..bed56b5 100644 --- a/zk/Bluetooth.md +++ b/zk/Bluetooth.md @@ -1,5 +1,8 @@ --- -tags: [] +tags: + - networks + - procedural + - Linux --- # Bluetooth diff --git a/zk/Boolean_algebra.md b/zk/Boolean_algebra.md index 379dc4a..0c3bd3a 100644 --- a/zk/Boolean_algebra.md +++ b/zk/Boolean_algebra.md @@ -1,5 +1,9 @@ --- -tags: [propositional-logic, algebra, nand-to-tetris] +tags: + - propositional-logic + - algebra + - nand-to-tetris + - logic --- # Boolean algebra diff --git a/zk/Boolean_function_synthesis.md b/zk/Boolean_function_synthesis.md index 81c8cc2..bae6d6c 100644 --- a/zk/Boolean_function_synthesis.md +++ b/zk/Boolean_function_synthesis.md @@ -1,5 +1,8 @@ --- -tags: [propositional-logic, nand-to-tetris] +tags: + - propositional-logic + - nand-to-tetris + - logic --- # Boolean function synthesis diff --git a/zk/Boolean_functions.md b/zk/Boolean_functions.md index 553f209..cbc2b6f 100644 --- a/zk/Boolean_functions.md +++ b/zk/Boolean_functions.md @@ -1,5 +1,8 @@ --- -tags: [propositional-logic, nand-to-tetris] +tags: + - propositional-logic + - nand-to-tetris + - logic --- # Boolean functions diff --git a/zk/Boot_process.md b/zk/Boot_process.md index dfde558..5ffc3cd 100644 --- a/zk/Boot_process.md +++ b/zk/Boot_process.md @@ -1,6 +1,7 @@ --- tags: - disks + - operating-systems --- # The boot process diff --git a/zk/Bus.md b/zk/Bus.md index cc9e688..ffb8882 100644 --- a/zk/Bus.md +++ b/zk/Bus.md @@ -1,5 +1,7 @@ --- -tags: [bus] +tags: + - bus + - computer-architecture --- # Bus diff --git a/zk/Change_DNS_server.md b/zk/Change_DNS_server.md deleted file mode 100644 index 75878d6..0000000 --- a/zk/Change_DNS_server.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: 81vp -title: Change_DNS_server -tags: [procedural] -created: Saturday, June 08, 2024 ---- - -# Change_DNS_server - -![](../img/change-dns-server.png) diff --git a/zk/Chipset_and_controllers.md b/zk/Chipset_and_controllers.md index 3e72c6b..8cc0057 100644 --- a/zk/Chipset_and_controllers.md +++ b/zk/Chipset_and_controllers.md @@ -1,5 +1,7 @@ --- -tags: [motherboard] +tags: + - hardware + - computer-architecture --- # Chipset and controllers diff --git a/zk/Forms.md b/zk/Forms_in_React.md similarity index 98% rename from zk/Forms.md rename to zk/Forms_in_React.md index 76d5d90..81f6745 100644 --- a/zk/Forms.md +++ b/zk/Forms_in_React.md @@ -2,13 +2,12 @@ tags: - javascript - react - - react-hooks --- # Forms using hooks 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` hook. diff --git a/zk/Iterating.md b/zk/Iterating_in_React.md similarity index 99% rename from zk/Iterating.md rename to zk/Iterating_in_React.md index f1f27a3..6c08818 100644 --- a/zk/Iterating.md +++ b/zk/Iterating_in_React.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # Iterating through data diff --git a/zk/Memoization.md b/zk/Memoization_in_React.md similarity index 98% rename from zk/Memoization.md rename to zk/Memoization_in_React.md index e1c0d1e..160fcca 100644 --- a/zk/Memoization.md +++ b/zk/Memoization_in_React.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # 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 `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 diff --git a/zk/Memory.md b/zk/Memory.md index 55c82c4..b1ab9b0 100644 --- a/zk/Memory.md +++ b/zk/Memory.md @@ -1,5 +1,7 @@ --- -tags: [memory, motherboard] +tags: + - memory + - computer-architecture --- # Memory diff --git a/zk/Motherboard.md b/zk/Motherboard.md index 72b0829..e9fe7e5 100644 --- a/zk/Motherboard.md +++ b/zk/Motherboard.md @@ -1,5 +1,7 @@ --- -tags: [motherboard] +tags: + - hardware + - computer-architecture --- # Motherboard diff --git a/zk/Errors.md b/zk/React_errors.md similarity index 90% rename from zk/Errors.md rename to zk/React_errors.md index 35fc8e3..3694a3c 100644 --- a/zk/Errors.md +++ b/zk/React_errors.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # Errors @@ -18,4 +17,4 @@ Once the data is returned, React tries to update the state but the component is unmounted. 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). diff --git a/zk/useContext.md b/zk/React_useContext.md similarity index 99% rename from zk/useContext.md rename to zk/React_useContext.md index f4c3c62..1d57cb8 100644 --- a/zk/useContext.md +++ b/zk/React_useContext.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # `useContext` diff --git a/zk/useEffect.md b/zk/React_useEffect.md similarity index 97% rename from zk/useEffect.md rename to zk/React_useEffect.md index aadbc5a..0e40e63 100644 --- a/zk/useEffect.md +++ b/zk/React_useEffect.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # `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 elements of the dependency araray). This is chiefly used to prevent [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: diff --git a/zk/useReducer.md b/zk/React_useReducer.md similarity index 97% rename from zk/useReducer.md rename to zk/React_useReducer.md index db75889..48b65f8 100644 --- a/zk/useReducer.md +++ b/zk/React_useReducer.md @@ -2,13 +2,12 @@ tags: - javascript - react - - react-hooks --- # `useReducer` 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 boolean. If you are updating the state of an object or more complex data structure, it is often more efficient to employ `useReducer`. diff --git a/zk/useState.md b/zk/React_useState.md similarity index 99% rename from zk/useState.md rename to zk/React_useState.md index 22c6948..83f67c6 100644 --- a/zk/useState.md +++ b/zk/React_useState.md @@ -2,7 +2,6 @@ tags: - javascript - react - - react-hooks --- # `useState`