How to create a compiler that brings data from 2 url's via fecth api?

0

I have 2 API addresses below, and I need to create a react card that brings the photo of the first API, and the second post.

link link

componentDidMount() {
  fetch('https://jsonplaceholder.typicode.com/users')
  .then(response=> response.json())
  .then(users => {this.setState({ post: users})});
}
render() {
    const { post, searchfield } = this.state;
    const filteredPost = post.filter(post =>{
        return post.name.toLowerCase().includes(searchfield.toLowerCase());
})
    return (
        <div className="App">
            <h1 style={{ textAlign: 'center'}}>
                Busca de Posts
            </h1>
            <Buscador searchChange={this.onSearchChange} />
            <div className='wrapper'>
                <UserList post={filteredPost} />
            </div>
        </div>
    );
}
    
asked by anonymous 22.09.2018 / 00:26

0 answers