vault backup: 2025-05-17 12:21:31

Affected files:
.obsidian/workspace.json
.obsidian_iphone/plugins/obsidian-spaced-repetition/data.json
.obsidian_iphone/workspace-mobile.json
2 Personal/1 Skills/IT/React Learnings.md
This commit is contained in:
2025-05-17 12:21:31 +02:00
parent e3ec013c3a
commit dc25086486
4 changed files with 64 additions and 42 deletions

View File

@@ -23,34 +23,6 @@
"title": "Dashboard" "title": "Dashboard"
} }
}, },
{
"id": "29fe6103d2a1b311",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "2 Personal/Lists/Packlisten/Packliste - Skitour.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Packliste - Skitour"
}
},
{
"id": "b61acafdb7bde436",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "0 Journal/0 Daily/2025-05-01.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "2025-05-01"
}
},
{ {
"id": "b5d9cec23d736cf3", "id": "b5d9cec23d736cf3",
"type": "leaf", "type": "leaf",
@@ -78,9 +50,23 @@
"icon": "lucide-file", "icon": "lucide-file",
"title": "Status Quo OneSec" "title": "Status Quo OneSec"
} }
},
{
"id": "fb9714bcef14ff37",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "2 Personal/1 Skills/IT/React Learnings.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "React Learnings"
}
} }
], ],
"currentTab": 2 "currentTab": 3
} }
], ],
"direction": "vertical" "direction": "vertical"
@@ -112,7 +98,7 @@
"state": { "state": {
"type": "search", "type": "search",
"state": { "state": {
"query": "", "query": "linsen",
"matchingCase": false, "matchingCase": false,
"explainSearch": false, "explainSearch": false,
"collapseAll": false, "collapseAll": false,
@@ -327,16 +313,20 @@
"periodic-notes:Open today": false "periodic-notes:Open today": false
} }
}, },
"active": "b61acafdb7bde436", "active": "fb9714bcef14ff37",
"lastOpenFiles": [ "lastOpenFiles": [
"Dashboard.md",
"2 Personal/1 Skills/IT/React Learnings.md",
"2 Personal/1 Skills/IT",
"2 Personal/Lists/Packlisten/Packliste - Skitour.md",
"2 Personal/Wohnen/Rezepte/Markdownload/Püree von roten Linsen mit Cherrytomaten-Gemüse.md",
"0 Journal/0 Daily/2025-05-01.md",
"0 Journal/0 Daily/2025-05-13.sync-conflict-20250513-182543-6QX3SGA.md", "0 Journal/0 Daily/2025-05-13.sync-conflict-20250513-182543-6QX3SGA.md",
"0 Journal/0 Daily/2025-05-13.md", "0 Journal/0 Daily/2025-05-13.md",
"99 Work/0 OneSec/OneSecThoughts/Status Quo OneSec.md", "99 Work/0 OneSec/OneSecThoughts/Status Quo OneSec.md",
"5 Media/0 Books/The Black Prism by Brent Weeks.md", "5 Media/0 Books/The Black Prism by Brent Weeks.md",
"0 Journal/0 Daily/2025-05-01.md",
"0 Journal/0 Daily/2025-04-28.md", "0 Journal/0 Daily/2025-04-28.md",
"0 Journal/0 Daily/2025-03-26.md", "0 Journal/0 Daily/2025-03-26.md",
"2 Personal/Lists/Packlisten/Packliste - Skitour.md",
"Sync", "Sync",
"Shared_Folder", "Shared_Folder",
"OneNote/BSM", "OneNote/BSM",
@@ -346,7 +336,6 @@
"5 Media/5 Other", "5 Media/5 Other",
"5 Media/3 Films", "5 Media/3 Films",
"3 Knowledge/4 Politics", "3 Knowledge/4 Politics",
"0 Journal/4 Yearly",
"2 Personal/Lists/Packlisten/Packliste - Skihochtour.md", "2 Personal/Lists/Packlisten/Packliste - Skihochtour.md",
"2 Personal/Lists/Packlisten/Packliste - Berge Mehrtages.md", "2 Personal/Lists/Packlisten/Packliste - Berge Mehrtages.md",
"2 Personal/Hobbies/Berge/Gletscherkurs/Gletscherkurs - Selbstudie.md", "2 Personal/Hobbies/Berge/Gletscherkurs/Gletscherkurs - Selbstudie.md",
@@ -362,9 +351,6 @@
"0 Journal/0 Daily/2025-04-08.md", "0 Journal/0 Daily/2025-04-08.md",
"Temporary/Untitled 4.md", "Temporary/Untitled 4.md",
"Excalidraw/Drawing 2025-04-08 11.44.11.excalidraw.md", "Excalidraw/Drawing 2025-04-08 11.44.11.excalidraw.md",
"2 Personal/Hobbies/Berge/Gletscherkurs/Gletscherkurs 2024.md",
"2 Personal/Home Lab/Repairshop/Data Recovery from corrupted Harddisks.md",
"0 Journal/0 Daily/2025-04-02.md",
"Attachments/Pasted image 20250402091926.png", "Attachments/Pasted image 20250402091926.png",
"Attachments/Pasted image 20250331151348.png", "Attachments/Pasted image 20250331151348.png",
"Attachments/IMG_5894.jpeg", "Attachments/IMG_5894.jpeg",

View File

@@ -47,7 +47,7 @@
"maxLinkFactor": 1, "maxLinkFactor": 1,
"showDebugMessages": false "showDebugMessages": false
}, },
"buryDate": "2025-05-13", "buryDate": "2025-05-16",
"buryList": [], "buryList": [],
"historyDeck": null "historyDeck": null
} }

View File

@@ -69,12 +69,12 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "0 Journal/0 Daily/2025-05-13.md", "file": "2 Personal/Wohnen/Rezepte/Markdownload/Püree von roten Linsen mit Cherrytomaten-Gemüse.md",
"mode": "source", "mode": "source",
"source": true "source": true
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "2025-05-13" "title": "Püree von roten Linsen mit Cherrytomaten-Gemüse"
} }
}, },
{ {
@@ -1251,6 +1251,26 @@
{ {
"id": "16616930c1927dd4", "id": "16616930c1927dd4",
"type": "leaf", "type": "leaf",
"state": {
"type": "review-queue-list-view",
"state": {},
"icon": "lucide-file",
"title": "Plugin no longer active"
}
},
{
"id": "b76b774dc445f44a",
"type": "leaf",
"state": {
"type": "review-queue-list-view",
"state": {},
"icon": "lucide-file",
"title": "Plugin no longer active"
}
},
{
"id": "567d74707cb7125a",
"type": "leaf",
"state": { "state": {
"type": "review-queue-list-view", "type": "review-queue-list-view",
"state": {}, "state": {},
@@ -1276,11 +1296,11 @@
"periodic-notes:Open today": false "periodic-notes:Open today": false
} }
}, },
"active": "f75db023ac07cdfd", "active": "567d74707cb7125a",
"lastOpenFiles": [ "lastOpenFiles": [
"0 Journal/0 Daily/2025-05-13.md",
"0 Journal/0 Daily/2025-05-13.sync-conflict-20250513-182543-6QX3SGA.md", "0 Journal/0 Daily/2025-05-13.sync-conflict-20250513-182543-6QX3SGA.md",
"2 Personal/Lists/Business Ideas.md", "2 Personal/Lists/Business Ideas.md",
"0 Journal/0 Daily/2025-05-13.md",
"2 Personal/Lists/Packlisten/Packliste - Skihochtour.md", "2 Personal/Lists/Packlisten/Packliste - Skihochtour.md",
"2 Personal/Lists/Packlisten/Packliste - Skitour.md", "2 Personal/Lists/Packlisten/Packliste - Skitour.md",
"2 Personal/Lists/Packlisten/Packliste - Berge Mehrtages.md", "2 Personal/Lists/Packlisten/Packliste - Berge Mehrtages.md",

View File

@@ -0,0 +1,16 @@
---
title: React Learnings
created_date: 2025-05-17
updated_date: 2025-05-17
aliases:
tags:
---
# React Learnings
## State Machine - Reducers
Reducers are what they are named after: they reduce the current state variable and an action/event into a new state and therefore are perfect for handling state machines of complex components within a react app.
The official documentation is really good: [useReducer React](https://react.dev/reference/react/useReducer) and this blog article helped me as well: [Medium](https://medium.com/better-programming/simplify-your-react-components-state-with-a-state-machine-8e9c9a4ee1f6)
Reducers are pure, so within the reducer function you never do any API calls or anything that needs to do calculations.
If you need to do any API calls or heavy calculations they must be done outside of the reducer function as explained here: [Just a moment...](https://stackoverflow.com/questions/64419132/how-to-make-api-call-in-usereducer).