Last active
August 6, 2022 00:06
-
-
Save artalar/dde51b3860d86929cdedafbc8927a261 to your computer and use it in GitHub Desktop.
json-template
This file contains hidden or 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
<> | |
<h1 id="login">Login</h1> | |
<form aria-describedby="login" onSubmit={handleSubmit}> | |
<input type="email" value={email} onChange={handleChangeEmail} /> | |
<input type="password" value={password} onChange={handleChangePassword} /> | |
<button type="submit">Submit</button> | |
</form> | |
</>; | |
// VS | |
({ | |
'h1 id="login"': "Login", | |
'form aria-describedby="login"': { | |
onSubmit: handleSubmit, | |
'input type="email"': { value: email, onChange: handleChangeEmail }, | |
'input type="password"': { value: password, onChange: handleChangePassword }, | |
'button type="submit"': "Submit", | |
}, | |
}); | |
// VS | |
({ | |
h1: { | |
id: "login", | |
children: "Login", | |
}, | |
form: { | |
ariaDescribedby: "login", | |
onSubmit: handleSubmit, | |
input: { | |
type: "email", | |
value: email, | |
onChange: handleChangeEmail, | |
}, | |
// error - doubled | |
input: { | |
type: "password", | |
value: password, | |
onChange: handleChangePassword, | |
}, | |
button: { | |
type: "submit", | |
children: "Submit", | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment