json of the data
listItems: {
id: 1,
name: 'Me',
description: 'you',
quantity: 1
}
json of the data
listItems: {
id: 1,
name: 'Me',
description: 'you',
quantity: 1
}
| import { | |
| ADD_LIST_ITEM, | |
| UPDATE_LIST_ITEM, | |
| REMOVE_LIST_ITEM, | |
| REMOVE_ALL_LIST_ITEMS | |
| } from "../actions"; | |
| const initialState = { | |
| listItems: {} | |
| }; |
| import React, { Component } from "react"; | |
| import { Container, Header, Segment } from "semantic-ui-react"; | |
| import { Link } from "react-router-dom"; | |
| import { withRouter } from "react-router-dom"; | |
| import { GithubLoginButton } from "react-social-login-buttons"; | |
| export class MainPage extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { |
| import React from "react"; | |
| import { render } from "react-dom"; | |
| import { BrowserRouter } from "react-router-dom"; | |
| import { Provider } from "react-redux"; | |
| import { createStore, compose } from "redux"; | |
| import throttle from "lodash/throttle"; | |
| import { loadState, saveState } from "./localStorage"; | |
| import "./index.css"; | |
| import listItems from "./reducers"; | |
| import App from "./App"; |
| export const loadState = () => { | |
| try { | |
| const serializedState = localStorage.getItem("state"); | |
| if (serializedState === null) { | |
| return undefined; | |
| } | |
| return JSON.parse(serializedState); | |
| } catch (err) { | |
| return undefined; | |
| } |
| import React from "react"; | |
| import { withRouter } from "react-router-dom"; | |
| import { connect } from "react-redux"; | |
| import List from "./List"; | |
| import { Container, Header, Grid, Divider } from "semantic-ui-react"; | |
| import AddItem from "./forms/AddItem"; | |
| // import "../App.css"; | |
| const ShoppingList = ({ |
| import { connect } from "react-redux"; | |
| import { | |
| addListItem, | |
| updateListItem, | |
| removeListItem, | |
| removeAllListItems | |
| } from "../actions"; | |
| import ShoppingList from "./ShoppingList"; |
| import React, { Component } from "react"; | |
| import { Container, Header, Segment } from "semantic-ui-react"; | |
| import { withRouter } from "react-router-dom"; | |
| import { GithubLoginButton } from "react-social-login-buttons"; | |
| export class MainPage extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| user: "" |
| import React from "react"; | |
| import { connect } from "react-redux"; | |
| import { | |
| Container, | |
| Header, | |
| Modal, | |
| Dropdown, | |
| Icon, | |
| Button | |
| } from "semantic-ui-react"; |
| import React, { Component } from "react"; | |
| import { connect } from "react-redux"; | |
| import SweetAlert from "sweetalert2-react"; | |
| import { Segment, Header, Form, Icon, Button, Menu } from "semantic-ui-react"; | |
| import DatePicker from "react-datepicker"; | |
| import moment from "moment"; | |
| import { Link, Redirect } from "react-router-dom"; | |
| import "react-datepicker/dist/react-datepicker.css"; | |
| import HomePageHeader from "../Headers/HomePageHeader"; |