Created
September 15, 2022 18:48
-
-
Save newerton/26ee8cfb0eb438dd04ebe39d6c23f691 to your computer and use it in GitHub Desktop.
Apply Dependency inversion principle (DIP)
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
import api from '~/common/api' | |
const ConnectedLoginForm = () => { | |
const handleSubmit = async (email, password) => { | |
await api.login(email, password) | |
} | |
return ( | |
<LoginForm onSubmit={handleSubmit} /> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment