【Vue and React: Beginner】 Like Vue's {{ $data }}, React also displays State in JSON.stringfy()


[* Just a note for beginners. 】

Vue First Day Vue {{ $data }} is useful I checked to see if it could be displayed in React as well.

Object list display JSON.stringfy() React State List

Vue https://jsfiddle.net/HarapekoWolf/ehmnt9bc/

React https://codesandbox.io/s/3y7zz71rv5

 render() {
    const outputTest = JSON.stringify(this.state, undefined, 4);

    return (
    "title": "Hello, React!",
    "user": {
        "name": "tom",
        "age": 16

If you check because the pre tag does not work It seems that you can specify a space with arguments!!

It comes out like this!! For details, please URL!! That's it.

はらぺこ うぉるふ
Author by

はらぺこ うぉるふ


Updated on December 28, 2018