libreact
React standard libraryโmust-have toolbox for any React project.
- LAUNCH STORYBOOK
๐ - See documentation
- Most components implement
- Isomorphic - most components work in browser and on server (and some in
react-native
).
Installation
npm i libreact --save
Usage
Library is modularโyou can import each component by its name.
import {mock} from 'libreact/lib/mock';
// or
import {mock} from 'libreact/modules/mock';
const MyComponent = mock();
Contents
- Introduction
- Dummies
mock()
andloadable()
โ examplelazy()
anddelayed()
- 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()
<Lifecycles>
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
โ example<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
<ScratchSensor>
,withScratch()
, and@withScratch
<ScrollSensor>
<SizeSensor>
,withSize()
, and@withSize
โ example<TouchSupportSensor>
<ViewportSensor>
,withViewport()
, and@withViewport
<WindowScrollSensor>
,withWindowScroll()
, and@withWindowScroll
<WindowSizeSensor>
,withWindowSize()
, and@withWindowSize
- Context
- Google Sign-in for Websites
<Provider>
,<Consumer>
,withContext()
, and@withContext
<Theme>
,<Themed>
,withTheme()
, and@withTheme
<CssVarsProvider>
,<CssVars>
,withCssVars()
, and@withCssVars
- Routing:
createRouter()
,<Router>
,<Route>
,<Switch>
,<Match>
,<Link>
, andgo()
<Translations>
,<Translate>
,<T>
,withT()
, and@withT
- UI
<Portal>
,<Overlay>
, and<Modal>
<Dimmer>
and<Dimmable>
<Parallax>
<FullScreen>
<Slider>
<DropArea>
<Group>
<InfiniteScroll>
<OutsideClick>
<Ripple>
andwithRipple()
โ example<Img>
<ListTable>
<WidthQuery>
,<View>
,<WindowWidthQuery>
, and<InlineWidthQuery>
<Audio>
and<Video>
<Speak>
,<Vibrate>
,<Alert>
- Animation
- Side Effects
- Boundaries
<BrowserOnly>
,<ServerOnly>
, and<ElectronOnly>
<ErrorBoundary>
andwithErrorBoundary()
<CacheBoundary>
- NEXT
- Other
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
License
Unlicense โ public domain.