node.js - Remove double quote from an api using React js -
i want remove de double quote api result. result: result
componentdidmount() { fetch('/todo/2') .then((response) => response.json()) .then((responsejson) =>{ this.setstate({ message: responsejson.data.publicacion }); }) }
here i'm printing result in react js:
<div classname="card-container"> <div classname="card"> <img classname="avatar" src={avatar} alt="" /> <div classname="name">peter stark</div> <div classname="date">a las 4:56 p.m. </div> <p classname="card"> {json.stringify(this.state.message)} </p> </div> </div>
Comments
Post a Comment