score:0

you are only rendering 1 <card> when defining the <cardview> component.

assuming noderesponse.imagefiles is an array of files, you should have something like the following:

class app extends component {
  constructor(props) {
    super(props);
    this.state = { 
      noderesponse: ''
  }
}

getfilestatusfromnode = (data) => {
    this.setstate({noderesponse: data})
  }

render() {

let cardview

if(this.state.noderesponse !== '') {
  cardview = this.state.noderesponse.imagefiles.map(file => (
     <card
       key={image.filename}
       name={image.filename}
       image={image.buffer} />
  )
)}

return (
      <div classname="app tc">
         { cardview }
      </div>
     )
   }
}

score:0

try with

class app extends component {
  constructor(props) {
    super(props);
    this.state = { 
      noderesponse: []
    }
  }

  getfilestatusfromnode = (data) => {
    // here you merge the previous data with the new
    const noderesponse = [...this.state.noderesponse, data];
    this.setstate({ noderesponse: noderesponse });
  }

  render() {
   return (<div classname="app tc">
      {this.state.noderesponse.map(n => <card key={n.filename} name={n.filename} image={n.buffer} />)}
   </div>);
  }
}

and in your child component

class card extends purecomponent {
  render() {
    const { src } = this.props;

   return (<a style={{width: 200, height: 250}} classname="tc">
      <div id='images'>
        <img style={{width: 175, height: 175}} classname='tc' alt='missing' src={`data:image/jpeg;base64, ${src}`}/>
      </div>
    </a>);
  }
}

Related Query

More Query from same tag