Git Product home page Git Product logo

workshop_react-training's Introduction

React Training

with Daniel Steigerwald

base on information and code from este

Prerequisites

Starting

Starting development

  • git clone [email protected]:literat/react-training.git
  • cd react-training
  • yarn
  • yarn dev
  • see http://localhost:3000

Starting backend

  • cd server
  • yarn
  • yarn dev
  • see http://localhost:4000 and http://localhost:5000

Sources

Javascript Development

Functional stuff

Reactive Programming

GraphQL

Testing

Other

Notes

Progress bar

  • když načítám ajaxem, tak je dobré, aby se stránka prednačetla až když má data, ale kvůli pomalému připojení je dobré uživateli zobrazit nejaký stav - viz např. github, je dobré progress bar zobrazovat až po nějakém krátkém čase (aby tam nebyl pořád), kouknout do este na LoadingBar.js

Fetch

  • fetch - lepší než jquery.ajax() - davidwalsh.name/fetch, používá Promise místo callbacku, ale pozor na to, že nejde udělat cancel, learn RxJS - dokumentace getInitialProps - pouze v pages, spousti Next.js, jako defaultni initial funkci imperativní/deklarativní data - react je deklarativni -> řeším pouze data, react automaticky data reprezentuje do UI

Miscellaneous

  • dynamický klíč: this.setState({ [e.currentTarget.name]: e.currentTarget.value });
  • algebraický typ / union type: type Now = number | "unknown";
  • exact type - nesmí se rozšířit o další property:
type ExactProps = {|
  now: number
|};

type IndexProps = {
  now: number,
  later: ?number, // null nebo number
  superlater?: number // nepovinna polozka
};
  • this:
foo() {
  this...
}

// this ktere ocekavam
foo = () => {
  this...
}
  • object change -> create new:
const Joe = {
  ...Joe,
  name: ‘Jine jmeno’
}

const products = [...products, 4, 5];
  • "private": true: nedovolí uploadovat balík do NPM repository

workshop_react-training's People

Contributors

literat avatar

Watchers

 avatar

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.