/react-hooks-example

Example of use of React Hooks

Primary LanguageJavaScript

Example of use of React Hooks

React Hooks is still in alpha version. This example is using React 16.8.0-alpha.0. Please check official documentation in https://reactjs.org/docs/hooks-intro.html.

Installing

You can clone our Git repository:

`$ git clone https://github.com/pmagaz/react-hooks-example

Starting Dev Server

Execute yarn start or npm run start to start the development server and the example.

Examples

  • UseState.jsx Use example of usestate hook
  • UseEffect.jsx Use example of useEffect hook
  • UseApiRequest.jsx A more complex use of Use of useEffect & useState
  • UseCallBack.jsx Use example of useCallback hook
  • UseMemo.jsx Use example of useMemo hook which works in the same way like useCallback
  • UseRef.jsx Use example of useRef hook
  • UseReducer.jsx Use example of useReducer hook
  • UseContext.jsx Use example of useContext hook

Warning

Those are a pretty basic examples for educational purposes and using an Alpha version. DON'T use it in production.