Code Monkey home page Code Monkey logo

shareable-custom-hooks-react's Introduction


Writing Shareable Custom React Hooks


Take Workshop

Ask a Question · Report Bug

Table of Contents

About The Workshop

Hooks are awesome because they're "first-class" utility functions provided by React to let you hook into state and other features while writing components. The cool thing about Hooks is that you can build on top of them to make your own. It’s like writing a function on top of lodash. You can gather something that might be reusable, and then package it up into a custom hook. That is the beauty of writing a shareable custom Hook in React.

Workshop Goals

After completing this workshop, you will understand how to write custom Hooks in React, and publish them as npm packages for the open source community.

Workshop Outcomes

By taking this workshop, you will learn how to:

  1. Understand what a “first-class” Hook is and isn’t
  2. Understand what a custom Hook is
  3. Write a custom Hook in an existing application
  4. Extract the Hook into a module
  5. Test the Hook locally
  6. Publish the Hook as an npm package

Prerequisites

Although this workshop is not targeted at React experts you'll need the following:

  • moderate React experience
  • some familiarity with Hooks
  • an npm account

Pre-Workshop Instructions

Before you join us for the workshop, please make sure to the following:

  1. Download Zoom
  2. Clone this repo so you have it locally
  3. Create an npm account (needed to publish your package)
  4. Install create-react-hook globally
  • npm i -g create-react-hook
  • yarn add global create-react-hook
  • or you can run it during the workshop using `npx create-react-hook

Resources

If you run into road blocks at anytime in the workshop or want additional resources, here's a list of things to check out:

shareable-custom-hooks-react's People

Contributors

jsjoeio 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.