If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:
var component = <Component foo={x} bar={y} />;
Mutating Props is Bad, mkay
// SSHClone clones a private GitHub repository using SSH, in the directory passed as parameter | |
func SSHClone(dest string) error { | |
var publicKey *ssh.PublicKeys | |
sshKey, err := ioutil.ReadFile("/Users/youruser/.ssh/id_rsa") | |
if err != nil { | |
return err | |
} | |
publicKey, err = ssh.NewPublicKeys("git", sshKey, "") | |
if err != nil { |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme" | |
android:networkSecurityConfig="@xml/network_security_config"> |