All Projects → jaredLunde → render-props

jaredLunde / render-props

Licence: other
㸚 Easy-to-use React state containers which utilize the render props (function as child) pattern

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to render-props

redebounce
↘️ Render Props component to debounce the given value
Stars: ✭ 14 (-57.58%)
Mutual labels:  debounce, render-props
mousecase
A JavaScript utility enabling horizontal dragging on mousedown events 🖱
Stars: ✭ 35 (+6.06%)
Mutual labels:  scrolling, mouse-events
react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (+281.82%)
Mutual labels:  scrolling, viewport
onscroll-effect
A tiny JavaScript library to enable CSS animations when user scrolls.
Stars: ✭ 35 (+6.06%)
Mutual labels:  scrolling, viewport
React Intersection Observer
React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.
Stars: ✭ 2,689 (+8048.48%)
Mutual labels:  scrolling, viewport
React Powerplug
🔌 Renderless Containers
Stars: ✭ 2,704 (+8093.94%)
Mutual labels:  state-container, render-props
vue-in-viewport-mixin
Vue 2 mixin to determine when a DOM element is visible in the client window
Stars: ✭ 99 (+200%)
Mutual labels:  scrolling, viewport
render-props
Easily and reliably support Render Props, Component Injection, and Function as a Child
Stars: ✭ 82 (+148.48%)
Mutual labels:  function-as-child, render-props
Viewprt
A tiny, dependency-free, high performance viewport position & intersection observation tool
Stars: ✭ 36 (+9.09%)
Mutual labels:  scrolling, viewport
React Intersection Observer
React component for the Intersection <Observer /> API
Stars: ✭ 940 (+2748.48%)
Mutual labels:  scrolling, viewport
angular-inviewport
A simple lightweight library for Angular with no other dependencies that detects when an element is within the browser viewport and adds a "sn-viewport-in" or "sn-viewport-out" class to the element
Stars: ✭ 72 (+118.18%)
Mutual labels:  scrolling, viewport
Scrollmonitor
A simple and fast API to monitor elements as you scroll
Stars: ✭ 3,250 (+9748.48%)
Mutual labels:  dom, viewport
React Cool Inview
😎 🖥️ React hook to monitor an element enters or leaves the viewport (or another element).
Stars: ✭ 830 (+2415.15%)
Mutual labels:  scrolling, viewport
scrollparent.js
A function to get the scrolling parent of an html element.
Stars: ✭ 51 (+54.55%)
Mutual labels:  dom, scrolling
Motus
Animation library that mimics CSS keyframes when scrolling.
Stars: ✭ 502 (+1421.21%)
Mutual labels:  dom, viewport
aurum
Fast and concise declarative DOM rendering library for javascript
Stars: ✭ 17 (-48.48%)
Mutual labels:  dom
hypercomponent
⚡ Fast and light component system, backed by hyperHTML
Stars: ✭ 45 (+36.36%)
Mutual labels:  dom
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-48.48%)
Mutual labels:  scrolling
glimmer-dsl-opal
Glimmer DSL for Opal (Pure-Ruby Web GUI and Auto-Webifier of Desktop Apps)
Stars: ✭ 22 (-33.33%)
Mutual labels:  dom
html5parser
A super tiny and fast html5 AST parser.
Stars: ✭ 153 (+363.64%)
Mutual labels:  dom






Easy-to-use render props (function as child) components for common needs

https://www.npmjs.com/org/render-props

Packages

Contents


General Purpose


Value @render-props/value

A component with an interface for setting, clearing and resetting values in a controlled or uncontrolled setting.

Toggle @render-props/toggle

A component with an interface for toggling values between on/off states in a controlled or uncontrolled setting.

Events @render-props/events

A component with an interface for managing events registered by its child components. This component will automatically 'garbage collect' listeners when it unmounts.

Counter @render-props/counter

A component with an interface for bound-value counting.

Point @render-props/point

A component with an interface for setting and moving coordinate {x, y} values.

Items @render-props/items

Components called Items and ItemSet with an interface for adding and removing items from arrays and sets while maintaining immutability on those arrays and sets, allowing for strict-comparison in child components.

Choices @render-props/choices

Components that provides an interface for making selections from a group of choices. The Choices component itself is a context provider which can be used with the Choice and ChoicesConsumer components for deep-tree selections. It does not have to be used with these components, however.

Subscriptions @render-props/subscriptions

A component for communicating changes to the state of one component to another component(s). This was much more useful before the React.createContext API in React 16.3 for ensuring context updates reached their consumers.

Paragraphs @render-props/paragraphs

A component an interface for creating paragraphs with line breaks from raw text with \n new lines.


Throttling State


Throttle @render-props/throttle

A component for throttling state changes with requestAnimationFrame

Debounce @render-props/debounce

A component for debouncing state changes with lodash's debounce function


DOM


Mouse Events


Click @render-props/click

A component with an interface for targeting specific types of click events (e.g. double-click) and extracting rich stats about click position within the client, window, etc. making it perfect for UX analytics work and in-browser gaming.

Hover @render-props/hover

A component with an interface for listening to hover events on child components. The state of this component will only update if the device being used supports hover according to !(window.matchMedia('(hover: none)').matches)

MousePosition @render-props/mouse-position

A component with a performant interface for tracking the position of the mouse as it moves around the screen - perfect for UX analytic tracking and also in-browser gaming.


Sizing


Rect @render-props/rect

A component with an interface for retrieving the DOMRect of an element.

SizeObserver @render-props/size-observer

A component with an interface for constantly querying for changes to the size of the referenced element in its child function.

ImageProps @render-props/image-props

A component with an interface for getting the natural size, rendered size and orientation from <img> elements after they have loaded successfully.


Scrolling + Window


Viewport @render-props/viewport

Multiple components for listening and responding to viewport events in a scalable fashion.

Scrollable @render-props/scrollable

A component with an interface for listening to the scroll event of its child component and providing valuable data about direction, distance, and more. It also provides convenience functions for scrollTo with optional animation.


Styles


WillChange @render-props/will-change

A component with an interface for applying CSS will-change styles to its child components when given events fire. This is incredibly useful because browsers recommend that you use this CSS property sparingly, as it's a GPU-hog. You should really only be applying it directly before the event occurs.


Utils


compose @render-props/compose

A utility for flattening nested render props component calls safely and in a way that doesn't take a huge performance hit.

import compose from '@render-props/compose'
import Toggle from '@render-props/toggle'
import Counter from '@render-props/counter'

const Composed = compose({
  toggle: Toggle,
  counter: Counter
})

<Composed toggle={propsPassedToToggle} counter={propsPassedToCounter}>
  {function ({toggle, counter}) {
    // toggle = render props returned by the Toggle component
    // counter = render props returned by the Counter component
  }}
</Composed>
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].