This was parsed from the official Qwik vs React "cheatsheet" in order to present it in a tabular side-by-side format.
I intend to improve upon it and provide additional examples.
See the Python script in this repo if you wish to reproduce it.
Aspect | Qwik | React |
---|---|---|
Hello world component |
|
|
Button with a click handler |
|
|
Using Props |
|
|
Declare local state |
|
|
Create a counter component |
|
|
Create a clock that increments every second |
|
|
Perform a fetch request every time the state changes |
|
|
Declare some context and consume it |
|
|
Create a debounced input |
|
|
Change background color randomly every button click |
|
|
Create a component that renders a list of the presidents |
|
|