(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I hereby claim:
- I am phucledien on github.
- I am phucld (https://keybase.io/phucld) on keybase.
- I have a public key ASAgfjMhKvCpf1swE-crUFvmfVi77RpPweH_2GNugK8_4wo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPC s c remove highlight | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| | |
| ~SPC f c~ | copy current file to a different location | | |
| ~SPC f C d~ | convert file from unix to dos encoding | | |
| ~SPC f C u~ | convert file from dos to unix encoding | |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Every view interacting with a `SayHelloViewModel` instance can conform to this. | |
protocol SayHelloViewModelBindable { | |
var disposeBag: DisposeBag? { get } | |
func bind(to viewModel: SayHelloViewModel) | |
} | |
/// TableViewCells | |
final class TextFieldCell: UITableViewCell, SayHelloViewModelBindable { | |
@IBOutlet weak var nameTextField: UITextField! | |
var disposeBag: DisposeBag? |
I hereby claim:
- I am phucledien on github.
- I am phucld (https://keybase.io/phucld) on keybase.
- I have a public key ASBiatEcxVZQ9aCLuqHPeKcmWtPgFsgs6GG9kkSCD70I5Qo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
OlderNewer