https://github.com/shankytiwari/react-browser-to-props
A HOC Components with Web API support for React Components
https://github.com/shankytiwari/react-browser-to-props
browser-api-props local-storage-to-props react-browser-to-props web-api-react-props web-api-to-props
Last synced: 7 months ago
JSON representation
A HOC Components with Web API support for React Components
- Host: GitHub
- URL: https://github.com/shankytiwari/react-browser-to-props
- Owner: ShankyTiwari
- License: mit
- Created: 2020-06-02T05:48:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T18:45:18.000Z (over 2 years ago)
- Last Synced: 2024-04-29T08:21:57.351Z (over 1 year ago)
- Topics: browser-api-props, local-storage-to-props, react-browser-to-props, web-api-react-props, web-api-to-props
- Language: TypeScript
- Size: 637 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-browser-to-props
A HOC Components with Web API support for React Components## Why react-browser-to-props?
The main goal of this package is to deliver High Order Component which consumes daily use WebAPIs such as LocalStorage, Cookie Storage, and some common utility functions such as reading the query params, that can fit into any kind of project with no muss, no fuss.
## Demo
Check the Month picker in action, [click here](https://react-fljxsu.stackblitz.io/?name=Shashank&lastname=tiwari).
## Install
You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.#### NPM
```bash
npm install --save react-browser-to-props
```
#### YARN
```
yarn add --save react-browser-to-props
```## Usage
```tsx
import BrowserToProps from 'react-browser-to-props';
const App = (props) => {
console.log(props)
return (
Check the console
);
};const NewComponent = BrowserToProps(App);
ReactDOM.render(
,
document.getElementById('root')
);
```## Thanks
This Project is build using [tsdx](https://github.com/jaredpalmer/tsdx).
## License
MIT © [ShankyTiwari](https://github.com/ShankyTiwari)