Git Product home page Git Product logo

react-hooks-demo's Introduction

Documentation

Starter Kit

The demo uses starter kit https://github.com/adeelibr/react-starter-kit

Demo Includes

  • Example of useState
  • Example of useEffect
  • Example of useContext
  • Example of custom hooks
    • custom hook useWindowWidth
    • custom hook useDocumentTitle
    • custom hook useFormInput
  • Example of useReducer
  • Examples of useSpring (react-spring) hooks
    • Progress bar example
    • Fade example

How to run

$ yarn 
$ yarn start // development
$ yarn build // production build

How to use

In src/index.js

There is an object called const VISIBLE = {}; with a list of all examples, all you have to do is, to see a particular example. Let's say you want to see react-spring examples of hooks, do the following in your App state

state = {
    isVisible: [
      VISIBLE.IS_REACT_SPRING_1_VISIBLE,
      VISIBLE.IS_REACT_SPRING_2_VISIBLE,
    ],
};

And that's pretty much it, just add a VISIBLE.SOME_EXMAPLE to your isVisible state array, your app will hot reload with the new UI information.

react-hooks-demo's People

Contributors

adeelibr avatar filmboy3 avatar hank7444 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.