score:1

Accepted answer
    constructor(props) {
        super(props);
        this.state = {
     Prix: []};
    render() {
    let {
          Prix
        } = this.state.Prix;
    return (
     <td>
 {  this.state.Prix.map((pr, k) => 
      <p key={k} >{pr.PrixV} </p>
                       )} 
                         </td>
    );}
    PrixDisplay(selectprdt) {
        return axios.get("/app/getPrixprod/" + selectprdt).then(response => {
         if (response && response.data) {
            this.setState({
              Prix: response.data
            });
          }

        }).catch(error => {
          console.error(error);

        });
      }

score:1

<p>{this.state.PrixV} </p>

PrixDisplay(selectprdt) {
    return axios.get("/app/getPrixprod/" + selectprdt).then(response => {
        if (response && response.data && response.data[0]) {
            this.setState({
            PrixV: response.data[0].PrixV
            });
        }
            console.log(response.data)
        }).catch(error => {
        console.error(error);
    });
}

Related Query

More Query from same tag