Created
July 22, 2019 18:11
-
-
Save Malmousque/57bbdb8c7485150fb50ad8edf2d9a10b to your computer and use it in GitHub Desktop.
fonction recherche React
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
| <div> | |
| <button onClick={this.handledonneMoiUnSimpsonClick}> | |
| Filtre les Simpson ! | |
| </button> | |
| <div> | |
| {this.state.quotes | |
| .filter( | |
| quote => | |
| !this.state.donneMoiUnSimpson || | |
| quote.character.includes("Simpson") | |
| ) | |
| .map((quote, index) => <Quote {...quote} />)} | |
| </div> | |
| </div> | |
| ); | |
| } | |
| } | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment