Package Exports
- libreact
- libreact/lib/AfterTimeout
- libreact/lib/FocusSensor
- libreact/lib/HoverSensor
- libreact/lib/Modal
- libreact/lib/Portal
- libreact/lib/Ripple
- libreact/lib/SizeSensor
- libreact/lib/WindowScrollSensor
- libreact/lib/util
- libreact/lib/util/renderProp
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (libreact) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
libreact
React standard library — must-have toolbox for any React project.
- React router, sensors, inversions, context providers, dummies, and other goodies.
- Isomorphic - all components work in browser and on server (and some in
react-native
). - See demos, docs, and package.
Installation
npm i libreact --save
Usage
Import each utility individually to decrease your bundle size
import {mock} from 'libreact/lib/mock';
const MyComponent = mock();
Contents
- Introduction
- Dummies
mock()
andloadable()
— examplelazy()
,delayed()
, andviewport()
- Inversion
<State>
andwithState()
<Toggle>
,withToggle()
, and@withToggle
— example<Flipflop>
,withFlipflop()
, and@withFlipflop
<Value>
,withValue()
, and@withValue
<Counter>
,withCounter()
and@withCounter
<List>
,withList()
, and@withList
<Map>
,withMap()
, and@withMap
<ShouldUpdate>
,shouldUpdate()
, andpure()
invert()
and<Inverted>
- Sensors
<ActiveSensor>
,withActive()
, and@withActive
<BatterySensor>
,withBattery()
, and@withBattery
<ExitSensor>
— example<FocusSensor>
,withFocus()
, and@withFocus
<GeoLocationSensor>
,withGeoLocation()
, and@withGeoLocation
<HoverSensor>
,withHover()
, and@withHover
<IdleSensor>
,withIdle()
, and@withIdle
<MediaDeviceSensor>
,withMediaDevices()
, and@withMediaDevices
<MediaSensor>
,withMedia()
, and@withMedia
<MotionSensor>
,withMotion()
, and@withMotion
<MouseSensor>
,withMouse()
, and@withMouse
— example<NetworkSensor>
,withNetwork()
, and@withNetwork
<LightSensor>
,withLight()
, and@withLight
<LocationSensor>
,withLocation()
, and@withLocation
<OrientationSensor>
,withOrientation()
, and@withOrientation
<ScrollSensor>
<SizeSensor>
,withSize()
, and@withSize
— example<ViewportSensor>
,withViewport()
, and@withViewport
<WindowScrollSensor>
,withWindowScroll()
, and@withWindowScroll
<WindowSizeSensor>
,withWindowSize()
, and@withWindowSize
- Context
<Provider>
,<Consumer>
,withContext()
, and@withContext
<Theme>
,<Themed>
,withTheme()
, and@withTheme
<CssVarsProvider>
,<CssVars>
,withCssVars()
, and@withCssVars
<Router>
,<Route>
,withRoute()
,@withRoute
,go()
, and<Go>
<Translations>
,<Translate>
,<T>
,withT()
, and@withT
- UI
<Portal>
,<Overlay>
, and<Modal>
<FullScreen>
<Slider>
<DropArea>
<Ripple>
andwithRipple()
— example<Audio>
and<Video>
<Speak>
,<Vibrate>
,<Alert>
,<Prompt>
,<Confirm>
- Animation
- Side Effects
<LocalStorage>
,<SessionStorage>
,<IndexedDb>
<Title>
,<Favicon>
go()
,<Redirect>
,<Link>
,<Sms>
,<Mailto>
, and<Tel>
- Boundaries
<BrowserOnly>
,<ServerOnly>
, and<ElectronOnly>
<ErrorBoundary>
andwithErrorBoundary()
<CacheBoundary>
- CSS
- CSS resets
- Other
<Resolve>
,<Fetch>
getDisplayName()
<Locales>
<Draggable>
,<Droppable>
,<Parallax>
,<Pin>
- Electron
<Menu>
and<MenuItem>
License
Unlicense — public domain.