All Projects → deepsweet → Hocs

deepsweet / Hocs

Licence: mit
🍱 Higher-Order Components for React

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Hocs

react-app-loader
Production ready library for handling Microfrontends
Stars: ✭ 75 (-95.8%)
Mutual labels:  higher-order-component, hoc
reassemble
Fast Library for the Composition of React Higher-Order-Components
Stars: ✭ 67 (-96.24%)
Mutual labels:  higher-order-component, recompose
rrx
⚛️ Minimal React router using higher order components
Stars: ✭ 69 (-96.13%)
Mutual labels:  higher-order-component, hoc
React Bps
🔱 Create breakpoints to your component props
Stars: ✭ 64 (-96.41%)
Mutual labels:  higher-order-component, hoc
Recompact
⚛ A set of React higher-order components utilities. Drop-in replacement for recompose.
Stars: ✭ 419 (-76.51%)
Mutual labels:  higher-order-component, hoc
React With Direction
Components to provide and consume RTL or LTR direction in React
Stars: ✭ 176 (-90.13%)
Mutual labels:  higher-order-component, hoc
react-animation-frame
A React higher-order component that invokes a callback in a wrapped component via requestAnimationFrame
Stars: ✭ 47 (-97.37%)
Mutual labels:  higher-order-component, hoc
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (-90.3%)
Mutual labels:  higher-order-component, hoc
addhoc
Handy little helper to create proper React HOC functions complete with hoisted statics and forwarded refs
Stars: ✭ 40 (-97.76%)
Mutual labels:  higher-order-component, hoc
nextjs-redux-instagram
🌏 The simple Instagram was written by next.js & redux-saga & recompose
Stars: ✭ 48 (-97.31%)
Mutual labels:  higher-order-component, recompose
Neoform
✅ React form state management and validation
Stars: ✭ 162 (-90.92%)
Mutual labels:  higher-order-component, hoc
Incompose
A inferno utility belt for function components and higher-order components
Stars: ✭ 76 (-95.74%)
Mutual labels:  higher-order-component, hoc
react-table-hoc-draggable-columns
ReactTable HOC for draggable columns
Stars: ✭ 27 (-98.49%)
Mutual labels:  higher-order-component, hoc
react-drip-form
☕ HoC based React forms state manager, Support for validation and normalization.
Stars: ✭ 66 (-96.3%)
Mutual labels:  higher-order-component, hoc
Flagged
Feature Flags for React made easy with hooks, HOC and Render Props
Stars: ✭ 97 (-94.56%)
Mutual labels:  higher-order-component, hoc
Next Nprogress
Next.js HOC to integrate NProgress inside your app
Stars: ✭ 145 (-91.87%)
Mutual labels:  higher-order-component, hoc
Rnprojectplayground
🍨React Native 相关,涉及 MobX、MST使用,原生简易导航模块、列表组件封装,一些动画尝试,以及 HOC 应用。
Stars: ✭ 100 (-94.39%)
Mutual labels:  hoc
Spring Higher Order Components
⚡️ Preconfigured components to speedup Spring Boot development
Stars: ✭ 65 (-96.36%)
Mutual labels:  higher-order-component
Withobservables
HOC (Higher-Order Component) for connecting RxJS Observables to React Components
Stars: ✭ 41 (-97.7%)
Mutual labels:  hoc
React Goodbye
A save reminder component for react router v4+.
Stars: ✭ 120 (-93.27%)
Mutual labels:  higher-order-component

@hocs

ci coverage

A collection of Higher-Order Components for React, especially useful with Recompose.

A Higher-Order Component is a function that takes a component and returns a new component.

Packages

Universal

🚱 omit-props

Helps to omit unnecessary context, state setters or anything else you don't want to propagate with {...spread}.

♻️ with-lifecycle

Provides a handy way to use some of React Component Lifecycle methods.

debounce-handler

Helps to debounce handlers like onChange.

throttle-handler

Helps to throttle handlers like onChange.

safe-timers

Provides safe versions of setTimeout, setInterval, requestAnimationFrame and requestIdleCallback which will be cleared/cancelled automatically before component is unmounted.

🔔 with-callback-on-change

Invokes a callback on prop change, useful to decouple side effects like onChange handler in a declarative way.

🔔 with-callback-on-change-while

Invokes a callback on prop change while condition is true, useful to decouple side effects like onChange handler in a declarative way and control loops.

🔔 with-callback-once

Invokes a callback once condition is true (while previous check was false), useful to decouple side effects like onSuccess or onError handlers in a declarative way.

🔍 with-log

Injects console.log with props or any custom message into render.

🔍 with-debugger

Injects debugger into render.

Browser

↔️ with-match-media-props

Dynamically map CSS Media Queries matches to boolean props using window.matchMedia() (Can I use?).

↔️ with-resize-observer-props

Dynamically map component size and position changes to props using Resize Observer API (Can I use? 🙈).

👀 with-intersection-observer-props

Dynamically map visibility of a component to boolean props using Intersection Observer API (Can I use?).

🙈 with-page-visibility-props

Dynamically map page visibility status to props using Page Visibility API (Can I use?).

🔌 with-online-status-props

Dynamically map online/offline status to props using navigator.onLine (Can I use?).

prevent-handlers-default

Decouples e.preventDefault() side effect from handlers like form submitting or clicking a link.

React Native

↔️ with-view-layout-props

Dynamically map View layout dimensions to props using onLayout() handler.

…and more to come

You can follow me on Twitter for updates.

Development

  1. Create a new folder in packages/, let's say with-foo.
  2. See package.json in already existing packages and create new with-foo/package.json.
  3. Put source code in with-foo/src/, it will be transpiled and bundled into with-foo/dist/, with-foo/lib/ and with-foo/es/.
  4. Put tests written with Jest in with-foo/test/.
  5. Put demo in with-foo/demo/, it will be rendered and wrapped with HMR.

Available commands using Start:

yarn start build <package>
yarn start demo <package>
yarn start test
yarn start testWatch
yarn start lint
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].