162 | {index + 1}. {post.title} 163 |
164 |{post.body.substr(0, 100)}...
165 | 168 | 174 |├── index.html ├── README.md ├── package.json ├── index.js ├── App.css └── App.js /index.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React Simple-Blog-App (Edit-Delete) 2 | 3 | [Edit on StackBlitz ⚡️](https://stackblitz.com/edit/react-lgbkuj) 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react", 3 | "version": "0.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "axios": "^0.19.2", 7 | "react": "16.12.0", 8 | "react-dom": "16.12.0" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test --env=jsdom", 14 | "eject": "react-scripts eject" 15 | }, 16 | "devDependencies": { 17 | "react-scripts": "latest" 18 | } 19 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | //import './index.css'; 4 | import App from './App'; 5 | //import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(Loading Posts...
158 | ) : ( 159 | this.state.data.map((post, index) => ( 160 |{post.body.substr(0, 100)}...
165 | 168 | 174 |