React officially recommends that you use Next.js[ref], so just do it. It just sets up obvious missing functionality from raw React.
Its main design goal is to reduce DOM changes to improve rendering times.
And an important side effect of that is that it becomes easier to do stuff of the type:and then the new comment easily gets the callback attached to it.
- user creates a new comment that appears on screen without page reload
- comment has a delete button, which is JavaScript callback activated
But React can also be extremely hard to use. It can be very hard to know what you can and cannot do sometimes, then you have to stop and try to understand how react works things better:The biggest problem is that it is hard to automatically detect such errors, but perhaps this is the same for other frontend stuff. Though when doing server-side rendering, the setup should really tell you about such errors, so you don't just discover them in production later on.
- cannot update a component while rendering a different component warning in React
- Rendered more hooks than during the previous render.
- cannot use hooks from helpers:
Examples under: react.
- react/hello.html
- react/hello-func.html: Hello World with a React function component instead of classes. At page load console shows:and then after each click:
Main
so we understand thatonClick Main
Main
insanely functions both as the constructor and as the render function in React function components. - react/hello-func-use-callback.html: same as react/hello-func.html but with useCallback. TODO no advantages in this case? When does it help?
- react/hello-without-jsx.html: Hello World in pure JavaScript, without JSX. Exactly equivalent to react/hello.html. Documented at: reactjs.org/docs/react-without-jsx.html Understanding this is fundamental to understanding React.
- By looking at the console, we see all
render
get called every time, even ifprops
didn't change, but not the constructors.After page load the console contains:Main.constructor Main.render NotMain.constructor NotMain.render NotMain2.constructor NotMain2.render
Note how theprops
ofNotMain
only change every other click, butrender
still gets called every time.In order to makeReact
not re-render when there are not changes, you have to either:- define the
shouldComponentUpdate
method of class components - wrap functional components in
React.memo
- define the
- react/prop-change-hook.html: same as react/prop-change.html, but using hooks. The notable difference is that functional components don't have a clear constructor/render separation, the function just gets called every time. Then React does some magic to ensure that
useState
returns the current state, except for the first render where they return the initial value. - react/prop-change-hook-use-memo.html: TODO forgot if this example is useful, was tring to use
useMemo
- react/prop-change-child.html: shows what child prop changes do not call render on parent,
Main
does not show up on console when you click underNotMain
- react/hook-from-function-fail.html: TODO got some errors that seemed linked to this on a larger program, but failed to minimize them here
- react/hook-different-number-of-times.html: this illustrates one of the cardinal points of using hooks: you must always call them the same number of times, otherwise it fails with:In the case of
React has detected a change in the order of Hooks called by Main. This will lead to bugs and errors if not fixed.
useState
, we can kind of understand why this happens: React must use the order of calls to determine which state variable to return at each point in time. - react/hello-hook-use-effect.html: just checking when it gets called. Happens after every render
handleClick Main useEffect useEffect2
- TODO create a test
\a[react/img-broken.html]
How React works bibliography:
- www.netlify.com/blog/2019/03/11/deep-dive-how-do-react-hooks-really-work/ shows how
uesState
works under the hood with crazy closures - medium.com/@gethylgeorge/how-virtual-dom-and-diffing-works-in-react-6fc805f9f84e
The leading no-royalties options as of 2020.
China has been a major RISC-V potential user in the late 2010s, since the country is trying to increase its semiconductor industry independence, especially given economic sanctions imposed by the USA.
E.g. a result of this, the RISC-V Foundation moved its legal headquarters to Switzerland in 2019 to try and overcome some of the sanctions.
Example: llvm/hello.ll adapted from: llvm.org/docs/LangRef.html#module-structure but without double newline.
To execute it as mentioned at github.com/dfellis/llvm-hello-world we can either use their crazy assembly interpreter, tested on Ubuntu 22.10:This seems to use
sudo apt install llvm-runtime
lli hello.ll
puts
from the C standard library.Or we can Lower it to assembly of the local machine:which produces:and then we can assemble link and run with gcc:or with clang:
sudo apt install llvm
llc hello.ll
hello.s
gcc -o hello.out hello.s -no-pie
./hello.out
clang -o hello.out hello.s -no-pie
./hello.out
hello.s
uses the GNU GAS format, which clang is highly compatible with, so both should work in general.CC BY-NC-SA unfortunately.
Upload is actually optional, and it appears that teachers do retain their copyright: ocw.mit.edu/ans7870/global/MIT_OpenCourseWare_FAQs.pdf Hmmm, so how have they convinced so many teachers to do it?
Made huge advances in radar.
Notably, Isidor Isaac Rabi was a leading figure there, and later he was head at the Columbia University laboratory that carried out the crucial Lamb-Retherford experiment and the anomalous magnetic dipole moment of the electron published at The Magnetic Moment of the Electron by Kusch and Foley (1948) using related techniques.
Structure of Some Crystalline Lysozyme-Inhibitor Complexes Determined by X-Ray Analysis At 6 Å Resolution (1965) Updated 2025-04-24 +Created 1970-01-01
www.nature.com/articles/206761a0 on Nature 206, 761-763. Paywalled as of 2022. Has some nice pictures in it.
To get an intuition for it, see the sample computation at: en.wikipedia.org/w/index.php?title=Ackermann_function&oldid=1170238965#TRS,_based_on_2-ary_function where in this context. From this, we immediately get the intuition that these functions are recursive somehow.
Lists:
- www.bibsonomy.org/user/bshanks/education fantastic list, presumably by this guy:
- www.reddit.com/r/Zettelkasten/comments/168cmca/which_note_taking_app_for_a_luhmann_zettlekasten/
- www.reddit.com/r/productivity/comments/18vvavl/best_free_notetaking_app_switching_from_evernote/
- github.com/topics/note-taking has a billion projects. Oops.
- www.noteapps.ca/
Personal knowledge base recommendation threads:
TODO look into those more:
- roamresearch.com/ no public graphs
- nesslabs.com/roam-research-alternatives a bunch of open source alternatives to it
- Trillium Notes. Notable project! Pun unintended!
- Stroll giffmex.org/stroll/stroll.html. How to publish? How to see tree?
- tiddlyroam joekroese.github.io/tiddlyroam/ graph rather than text searchable ToC. Public instance? Multiuser?
- Athens github.com/athensresearch/athens rudimentary WYSIWYG
- Logseq github.com/logseq/logseq no web interface/centralized server?
- itsfoss.com/obsidian-markdown-editor. Closed source. They have an OK static website publication mechanism: publish.obsidian.md/ram-rachum-research/Public/Agents+aren't+objective+entities%2C+they're+a+model but leaf node view only for now, no cross source page render. They are committed to having plaintext source which is cool: twitter.com/kepano/status/1675626836821409792
- CherryTree github.com/giuspen/cherrytree written in C++, GTK, WYSIWYG
- github.com/dullage/flatnotes: Python
- github.com/usememos/memos: Go
- github.com/siyuan-note/siyuan: Go
- github.com/vnotex/vnote: C++
- github.com/Laverna/laverna: JavaScript
- github.com/taniarascia/takenote
- github.com/silverbulletmd/silverbullet: TypeScript, Markdown, web-based WYSIWYG, focus on querying
Major downsides that most of those personal knowledge databases have:
- very little/no focus on public publishing, which is the primary focus of OurBigBook.com
- either limited or no multiuser features, e.g. edit protection and cross user topics
- graph based instead of tree based. For books we need a single clear ordering of a tree. Graph should come as a secondary thing through tags.
Closed source dump:
- www.toodledo.com
- Simplenote: en.wikipedia.org/wiki/Simplenote, by WordPress.com operator company Automattic
www.frontiersin.org/articles/10.3389/fninf.2019.00063/fullCoreNEURON: An Optimized Compute Engine for the NEURON Simulator (2019) Merged back into mainstream: github.com/BlueBrain/CoreNeuron
There are unlisted articles, also show them or only show them.