You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-3
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,24 @@ Note: Uses react canary (19)
5
5
Our [App.tsx](./src/App.tsx) here calculates factorial of a number, fibonacci sequence and does a bit of arithmetics but it does all that using react (not JS). What I mean by that is:
6
6
- No function recursion
7
7
- No loops
8
-
- No if-else/ternaries/`&& ||` ternaries
8
+
- No if-else/`?:`ternaries/`&& ||` ternaries
9
9
- No switch-case
10
10
- No arithmetic operators (Currently I'm still minus for convinience but that'll change)
11
11
12
+

13
+
14
+
12
15
## How it works
16
+
It's all a blur now. I was in a state of trance when I wrote this. But basically, it uses Suspense and react's ability to get stuck in infinite render/state-update loop to compute things.
17
+
18
+
Don't want to spend more time on this so if you need more details, feel free to ask in an issue. I'll be happy to explain.
19
+
13
20
14
-
It's all a blur now. I was in a state of trance when I wrote this. But basically, it uses Suspense and react's ability to get stuck in infinite render/state-update loop to calculate things.
21
+
## How to run it?
22
+
Why would you want to do something like that? But if you're sure you want to...
15
23
16
-
Don't want to spend more time on this so if you need more details, go through the code or ask me. I'll be happy to explain.
24
+
- Clone this thing
25
+
- Install dependencies `bun i` (Uses bun because I'm cool like that)
0 commit comments