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
import { compose } from "recompose"; | |
import withTextFieldState from "./withTextFieldState"; | |
import withEmailError from "./withEmailError"; | |
import withPasswordError from "./withPasswordError"; | |
import withConfirmPasswordError from "./withConfirmPasswordError"; | |
import withSubmitForm from "./withSubmitForm"; | |
export default compose( | |
withTextFieldState, |
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
import React from "react"; | |
import { TextField, Button, Grid } from "@material-ui/core"; | |
import withFormLogic from "./logic"; | |
const SignupForm = ({ | |
email, onChangeEmail, emailError, | |
password, onChangePassword, passwordError, | |
confirmPassword, onChangeConfirmPassword, confirmPasswordError, | |
onSubmit | |
}) => ( |
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
import { compose, pure } from "recompose"; | |
... | |
export default compose( | |
pure, | |
withFormLogic | |
)(SignupForm); |
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
const Greetings = ({ firstName }) => ( | |
<div>Hi, {firstName}</div> | |
); |
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
function App() { | |
return ( | |
<div className="App"> | |
... | |
</div> | |
); | |
} | |
export default App; |
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
const App = () => ( | |
<div className="App"> | |
... | |
</div> | |
); | |
export default App; |
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
const Greetings = (props) => <div>Hey you! {props.firstName} {props.lastName}!</div>; | |
const App = () => ( | |
<div> | |
<Greetings firstName="John" lastName="Smith" /> | |
</div> | |
); |
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
const Greetings = ({ firstName, lastName }) => <div>Hey you! {firstName} {lastName}!</div>; |
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
class Greetings extends React.Component { | |
render() { | |
return ( | |
<div>Hey you! {this.props.firstName} {this.props.lastName}!</div> | |
); | |
} | |
} |
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
import React from "react"; | |
class SimpleForm extends React.Component { | |
render() { | |
return ( | |
<div> | |
<input type="text" name="firstName" /> | |
<Greetings firstName="John" /> | |
</div> | |
); |