Code Monkey home page Code Monkey logo

random-quotes's Introduction

random-quotes's People

Contributors

pavoninushka avatar

Stargazers

Pavel Karateev avatar

Watchers

Pavel Karateev avatar  avatar

Forkers

lancelote

random-quotes's Issues

Switch from jQuert Ajax to Fetch API

At the moment jQuery Ajax is used in App.js to grab the file with quotes

componentDidMount() {
    $.ajax({
      headers: {
        Accept: "application/json"
      },
      url:
          "https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json",
      success: (jsonQuotes) => {
        let quotes = JSON.parse(jsonQuotes).quotes;
        this.props.saveQuotes(quotes);
      }
    });
  }

This can be rewritten using Fetch API.

Pass initial state to reducer as default parameter value

Before the default case is used in the reducer as an initial state which could be not very tight approach.
It might be better to pass initial state to reducer as default parameter value and return the current state in the default case.

Fix warnings

While running the app with npm start, several warnings appears in terminal :

Line 91:19:  Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener  react/jsx-no-target-blank
Line 120:3:  Useless constructor                                                                                                                          no-useless-constructor

Update README.md

At the moment README.md is filled with the default text left from create-react-app. Would be great to replace it with the current project description.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.