{"id":13727464,"url":"https://github.com/MailOnline/libreact","last_synced_at":"2025-05-07T22:31:19.144Z","repository":{"id":28568882,"uuid":"117969399","full_name":"MailOnline/libreact","owner":"MailOnline","description":"NO LONGER MAINTAINED - SEE https://github.com/streamich/libreact INSTEAD","archived":false,"fork":false,"pushed_at":"2023-07-12T03:34:21.000Z","size":2236,"stargazers_count":97,"open_issues_count":48,"forks_count":6,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-12-30T19:29:49.132Z","etag":null,"topics":["react","react-hoc","react-loadable","react-router","react-slider"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MailOnline.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-18T10:40:51.000Z","updated_at":"2023-07-27T12:03:19.000Z","dependencies_parsed_at":"2024-01-07T21:07:13.834Z","dependency_job_id":"f3b99334-f5e2-49a4-a3b7-706485ac172d","html_url":"https://github.com/MailOnline/libreact","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailOnline%2Flibreact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailOnline%2Flibreact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailOnline%2Flibreact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MailOnline%2Flibreact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MailOnline","download_url":"https://codeload.github.com/MailOnline/libreact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965462,"owners_count":21832893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","react-hoc","react-loadable","react-router","react-slider"],"created_at":"2024-08-03T01:03:58.060Z","updated_at":"2025-05-07T22:31:18.371Z","avatar_url":"https://github.com/MailOnline.png","language":"TypeScript","readme":"![libreact logo](./docs/assets/libreact.png)\n\n# libreact\n\n[![][npm-badge]][npm-url] [![][travis-badge]][travis-url] [![React Universal Interface](https://img.shields.io/badge/React-Universal%20Interface-green.svg)](https://github.com/streamich/react-universal-interface)\n\nReact standard library \u0026mdash; must-have toolbox for any React project.\n\n  - *Isomorphic* - all components work in browser and on server (and some in `react-native`).\n  - See [__demos__](https://streamich.github.io/libreact/demos/), [__docs__](https://streamich.github.io/libreact/en/), and [__package__](https://www.npmjs.com/package/libreact/).\n\n\n## Installation\n\n\u003cpre\u003e\nnpm i \u003ca href=\"https://www.npmjs.com/package/libreact\"\u003elibreact\u003c/a\u003e --save\n\u003c/pre\u003e\n\n\n## Usage\n\nImport each utility individually to decrease your bundle size\n\n```js\nimport {mock} from 'libreact/lib/mock';\n\nconst MyComponent = mock();\n```\n\n\n## Contents\n\n  - [Introduction](./docs/en/Introduction.md)\n  - [Dummies](./docs/en/Dummies.md)\n     - [`mock()`](./docs/en/mock.md) and [`loadable()`](./docs/en/loadable.md) \u0026mdash; [**example**](https://codesandbox.io/s/j2ovpr03z3)\n     - [`lazy()`](./docs/en/lazy.md) and [`delayed()`](./docs/en/delayed.md)\n  - [Inversion](./docs/en/Inversion.md)\n     - [`\u003cState\u003e`](./docs/en/State.md) and [`withState()`](./docs/en/State.md#withstate-hoc)\n        - [`\u003cToggle\u003e`](./docs/en/Toggle.md), [`withToggle()`](./docs/en/Toggle.md#withtoggle-hoc), and [`@withToggle`](./docs/en/Toggle.md#withtoggle-decorator) \u0026mdash; [**example**](https://codesandbox.io/s/zwkl16vv93)\n        - [`\u003cFlipflop\u003e`](./docs/en/Flipflop.md), [`withFlipflop()`](./docs/en/Flipflop.md#withflipflop-hoc), and [`@withFlipflop`](./docs/en/Flipflop.md#withflipflop-decorator)\n        - [`\u003cValue\u003e`](./docs/en/Value.md), [`withValue()`](./docs/en/Value.md#withvalue-hoc), and [`@withValue`](./docs/en/Value.md#withvalue-decorator)\n        - [`\u003cCounter\u003e`](./docs/en/Counter.md), [`withCounter()`](./docs/en/Counter.md#withcounter-hoc) and [`@withCounter`](./docs/en/Counter.md#withcounter-decorator)\n        - [`\u003cList\u003e`](./docs/en/List.md), [`withList()`](./docs/en/List.md#withlist-hoc), and [`@withList`](./docs/en/List.md#withlist-decorator)\n        - [`\u003cMap\u003e`](./docs/en/Map.md), [`withMap()`](./docs/en/Map.md#withmap-hoc), and [`@withMap`](./docs/en/Map.md#withmap-decorator)\n     - [`\u003cShouldUpdate\u003e`](./docs/en/ShouldUpdate.md), [`shouldUpdate()`](./docs/en/ShouldUpdate.md#shouldupdate-hoc), and [`pure()`](./docs/en/pure.md)\n     - [`\u003cLifecycles\u003e`](./docs/en/Lifecycles.md)\n     - [`invert()`](./docs/en/invert.md) and [`\u003cInverted\u003e`](./docs/en/invert.md#inverted)\n  - [Sensors](./docs/en/Sensors.md)\n     - [`\u003cActiveSensor\u003e`](./docs/en/ActiveSensor.md), [`withActive()`](./docs/en/ActiveSensor.md#withactive-hoc), and [`@withActive`](./docs/en/ActiveSensor.md#withactive-decorator)\n     - [`\u003cBatterySensor\u003e`](./docs/en/BatterySensor.md), [`withBattery()`](./docs/en/BatterySensor.md#withbattery), and [`@withBattery`](./docs/en/BatterySensor.md#withbattery-1)\n     - [`\u003cExitSensor\u003e`](./docs/en/ExitSensor.md) \u0026mdash; [**example**](https://codesandbox.io/s/7437x10z71)\n     - [`\u003cFocusSensor\u003e`](./docs/en/FocusSensor.md), [`withFocus()`](./docs/en/FocusSensor.md#withfocus-hoc), and [`@withFocus`](./docs/en/FocusSensor.md#withfocus-decorator)\n     - [`\u003cGeoLocationSensor\u003e`](./docs/en/GeoLocationSensor.md), [`withGeoLocation()`](./docs/en/GeoLocationSensor.md#withgeolocation-hoc), and [`@withGeoLocation`](./docs/en/GeoLocationSensor.md#withgeolocation-decorator)\n     - [`\u003cHoverSensor\u003e`](./docs/en/HoverSensor.md), [`withHover()`](./docs/en/HoverSensor.md#withhover-hoc), and [`@withHover`](./docs/en/HoverSensor.md#withhover-decorator) \u0026mdash; [**example**](https://codesandbox.io/s/8p3xqx83p9)\n     - [`\u003cIdleSensor\u003e`](./docs/en/IdleSensor.md), [`withIdle()`](./docs/en/IdleSensor.md#withidle-hoc), and [`@withIdle`](./docs/en/IdleSensor.md#withidle-decorator)\n     - [`\u003cMediaDeviceSensor\u003e`](./docs/en/MediaDeviceSensor.md), [`withMediaDevices()`](./docs/en/MediaDeviceSensor.md#withmediadevices), and [`@withMediaDevices`](./docs/en/MediaDeviceSensor.md#withmediadevices-1)\n     - [`\u003cMediaSensor\u003e`](./docs/en/MediaSensor.md), [`withMedia()`](./docs/en/MediaSensor.md#withmedia), and [`@withMedia`](./docs/en/MediaSensor.md#withmedia-1)\n     - [`\u003cMotionSensor\u003e`](./docs/en/MotionSensor.md), [`withMotion()`](./docs/en/MotionSensor.md#withmotion-hoc), and [`@withMotion`](./docs/en/MotionSensor.md#withmotion-decorator)\n     - [`\u003cMouseSensor\u003e`](./docs/en/MouseSensor.md), [`withMouse()`](./docs/en/MouseSensor.md#withmouse-hoc), and [`@withMouse`](./docs/en/MouseSensor.md#withmouse-decorator) \u0026mdash; [**example**](https://codesandbox.io/s/k3o16j7n47)\n     - [`\u003cNetworkSensor\u003e`](./docs/en/NetworkSensor.md), [`withNetwork()`](./docs/en/NetworkSensor.md#withnetwork-hoc), and [`@withNetwork`](./docs/en/NetworkSensor.md#withnetwork-decorator)\n     - [`\u003cLightSensor\u003e`](./docs/en/LightSensor.md), [`withLight()`](./docs/en/LightSensor.md#withlight-hoc), and [`@withLight`](./docs/en/LightSensor.md#withlight-decorator)\n     - [`\u003cLocationSensor\u003e`](./docs/en/LocationSensor.md), [`withLocation()`](./docs/en/LocationSensor.md#withlocation-hoc), and [`@withLocation`](./docs/en/LocationSensor.md#withlocation-decora)\n     - [`\u003cOrientationSensor\u003e`](./docs/en/OrientationSensor.md), [`withOrientation()`](./docs/en/OrientationSensor.md#withorientation-hoc), and [`@withOrientation`](./docs/en/OrientationSensor.md#withorientation-decorator)\n     - [`\u003cScratchSensor\u003e`](./docs/en/ScratchSensor.md), [`withScratch()`](./docs/en/ScratchSensor.md#withscratch-hoc), and [`@withScratch`](./docs/en/ScratchSensor.md#withscratch-decorator)\n     - [`\u003cScrollSensor\u003e`](./docs/en/ScrollSensor.md)\n     - [`\u003cSizeSensor\u003e`](./docs/en/SizeSensor.md), [`withSize()`](./docs/en/SizeSensor.md#withsize-hoc), and [`@withSize`](./docs/en/SizeSensor.md#withsize-decorator) \u0026mdash; [**example**](https://codesandbox.io/s/0y2qjm210p)\n        - [`\u003cWidthSensor\u003e`](./docs/en/WidthSensor.md), [`withWidth()`](./docs/en/WidthSensor.md#withwidth-hoc-and-withwidth-decorator), and [`@withWidth`](./docs/en/WidthSensor.md#withwidth-hoc-and-withwidth-decorator)\n     - [`\u003cViewportSensor\u003e`](./docs/en/ViewportSensor.md), [`withViewport()`](./docs/en/ViewportSensor.md#withviewport-hoc), and [`@withViewport`](./docs/en/ViewportSensor.md#withviewport-decorator)\n        - [`\u003cViewportScrollSensor\u003e`](./docs/en/ViewportSensor.md#viewportscrollsensor) and [`\u003cViewportObserverSensor\u003e`](./docs/en/ViewportSensor.md#viewportobserversensor)\n     - [`\u003cWindowScrollSensor\u003e`](./docs/en/WindowScrollSensor.md), [`withWindowScroll()`](./docs/en/WindowScrollSensor.md#withwindowscroll-hoc), and [`@withWindowScroll`](./docs/en/WindowScrollSensor.md#withwindowscroll-decorator)\n     - [`\u003cWindowSizeSensor\u003e`](./docs/en/WindowSizeSensor.md), [`withWindowSize()`](./docs/en/WindowSizeSensor.md#withwindowsize-hoc), and [`@withWindowSize`](./docs/en/WindowSizeSensor.md#withwindowsize-decorator)\n        - [`\u003cWindowWidthSensor\u003e`](./docs/en/WindowWidthSensor.md), [`withWindowWidth()`](./docs/en/WindowWidthSensor.md#withwindowwidth-hoc), and [`@withWindowWidth`](./docs/en/WindowWidthSensor.md#withwindowwidth-decorator)\n  - [Context](./docs/en/Context.md)\n     - [`\u003cProvider\u003e`](./docs/en/Provider.md#provider), [`\u003cConsumer\u003e`](./docs/en/Provider.md#consumer), [`withContext()`](./docs/en/Provider.md#withcontext-hoc), and [`@withContext`](./docs/en/Provider.md#withcontext-decorator)\n     - [`\u003cTheme\u003e`](./docs/en/theme.md#theme), [`\u003cThemed\u003e`](./docs/en/theme.md#themed), [`withTheme()`](./docs/en/theme.md#withtheme-hoc), and [`@withTheme`](./docs/en/theme.md#withtheme-decorator)\n     - [`\u003cCssVarsProvider\u003e`](./docs/en/cssvars.md), [`\u003cCssVars\u003e`](./docs/en/cssvars.md#cssvars), [`withCssVars()`](./docs/en/cssvars.md#withcssvars-hoc), and [`@withCssVars`](./docs/en/cssvars.md#withcssvars-decorator)\n     - [Router](./docs/en/routing.md)\n     - [`\u003cTranslations\u003e`](./docs/en/translate.md#translations), [`\u003cTranslate\u003e`](./docs/en/translate.md#translate-or-t), [`\u003cT\u003e`](./docs/en/translate.md#translate-or-t), [`withT()`](./docs/en/translate.md#witht-hoc), and [`@withT`](./docs/en/translate.md#witht-decorator)\n  - [UI](./docs/en/UI.md)\n     - [`\u003cPortal\u003e`](./docs/en/Portal.md), [`\u003cOverlay\u003e`](./docs/en/Overlay.md), and [`\u003cModal\u003e`](./docs/en/Modal.md)\n     - [`\u003cDimmer\u003e`](./docs/en/Dimmer.md) and [`\u003cDimmable\u003e`](./docs/en/Dimmable.md)\n     - [`\u003cParallax\u003e`](./docs/en/Parallax.md)\n     - [`\u003cFullScreen\u003e`](./docs/en/FullScreen.md)\n     - [`\u003cSlider\u003e`](./docs/en/Slider.md)\n     - [`\u003cDropArea\u003e`](./docs/en/DropArea.md)\n     - [`\u003cGroup\u003e`](./docs/en/Group.md)\n     - [`\u003cOutsideClick\u003e`](./docs/en/OutsideClick.md)\n     - [`\u003cRipple\u003e`](./docs/en/Ripple.md) and [`withRipple()`](./docs/en/Ripple.md#withripple) \u0026mdash; [**example**](https://codesandbox.io/s/983q7jr80o)\n     - [`\u003cImg\u003e`](./docs/en/Img.md)\n     - [`\u003cWidthQuery\u003e`](./docs/en/WidthQuery.md), [`\u003cView\u003e`](./docs/en/View.md), [`\u003cWindowWidthQuery\u003e`](./docs/en/WindowWidthQuery.md), and [`\u003cInlineWidthQuery\u003e`](./docs/en/InlineWidthQuery.md)\n     - [`\u003cAudio\u003e`](./docs/en/Audio.md) and [`\u003cVideo\u003e`](./docs/en/Video.md)\n     - [`\u003cSpeak\u003e`](./docs/en/Speak.md), [`\u003cVibrate\u003e`](./docs/en/Vibrate.md), [`\u003cAlert\u003e`](./docs/en/Alert.md)\n  - [Animation](./docs/en/Animation.md)\n     - [`\u003cAfterTimeout\u003e`](./docs/en/AfterTimeout.md), [`\u003cAfterDraf\u003e`](./docs/en/AfterDraf.md), and [`\u003cWhenIdle\u003e`](./docs/en/WhenIdle.md)\n     - [`\u003cRender\u003e`](./docs/en/Render.md), [`withRender()`](./docs/en/Render.md#withrender-hoc), and [`@withRender`](./docs/en/Render.md#withrender-decorator)\n     - [`\u003cRenderInterval\u003e`](./docs/en/RenderInterval.md), [`withRenderInterval()`](./docs/en/RenderInterval.md#withrenderinterval-hoc), and [`@withRenderInterval`](./docs/en/RenderInterval.md#withrenderinterval-decorator)\n     - [`\u003cTween\u003e`](./docs/en/Tween.md), [`withTween()`](./docs/en/Tween.md#withtween-hoc), and [`@withTween`](./docs/en/Tween.md#withtween-decorator)\n     - [`\u003cInterpolation\u003e`](./docs/en/Interpolation.md), [`withInterpolation()`](./docs/en/Interpolation.md#withinterpolation-hoc), and [`@withInterpolation`](./docs/en/Interpolation.md#withinterpolation-decorator)\n  - [Side Effects](./docs/en/Side-effects.md)\n     - [`\u003cLocalStorage\u003e`](./docs/en/LocalStorage.md)\n     - [`\u003cClassNames\u003e`](./docs/en/ClassNames.md)\n     - [`go()`](./docs/en/routing.md#go), [`\u003cSms\u003e`](./docs/en/Sms.md), [`\u003cMailto\u003e`](./docs/en/Mailto.md)\n  - [Boundaries](./docs/en/Boundaries.md)\n     - [`\u003cBrowserOnly\u003e`](./docs/en/BrowserOnly.md), [`\u003cServerOnly\u003e`](./docs/en/ServerOnly.md), and [`\u003cElectronOnly\u003e`](./docs/en/ElectronOnly.md)\n     - [`\u003cErrorBoundary\u003e`](./docs/en/ErrorBoundary.md) and [`withErrorBoundary()`](./docs/en/ErrorBoundary.md#witherrorboundary-hoc)\n     - `\u003cCacheBoundary\u003e`\n  - [NEXT](./docs/en/next.md)\n     - [`createRef()`](./docs/en/next/createRef.md), [`createState()`](./docs/en/next/createState.md), and [`createLifecycleEvents()`](./docs/en/next/createLifecycleEvents.md)\n  - Other\n     - [`\u003cResolve\u003e`](./docs/en/Resolve.md)\n     - [`getDisplayName()`](./docs/en/getDisplayName.md)\n\n\n## License\n\n[Unlicense](./LICENSE) \u0026mdash; public domain.\n\n\n[npm-url]: https://www.npmjs.com/package/libreact\n[npm-badge]: https://img.shields.io/npm/v/libreact.svg\n[travis-url]: https://travis-ci.org/streamich/libreact\n[travis-badge]: https://travis-ci.org/streamich/libreact.svg?branch=master\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMailOnline%2Flibreact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMailOnline%2Flibreact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMailOnline%2Flibreact/lists"}