Gathering detailed insights and metrics for @app-elements/connect
Gathering detailed insights and metrics for @app-elements/connect
Gathering detailed insights and metrics for @app-elements/connect
Gathering detailed insights and metrics for @app-elements/connect
@app-elements/use-request
Connect a Component to the result of an API request.
@ryniaubenpm/dolorum-mollitia-vero
React components for [Stripe.js and Elements](https://stripe.com/docs/stripe-js).
@ryniaubenpm2/adipisci-accusantium-dicta
This [vite](https://vitejs.dev/) plugin generates a single SVG spritemap containing multiple <symbol> elements from all `.svg` files in a directory.
@omegion1npm/sequi-a-consectetur
This [vite](https://vitejs.dev/) plugin generates a single SVG spritemap containing multiple <symbol> elements from all `.svg` files in a directory.
npm install @app-elements/connect
Typescript
Module System
Node Version
NPM Version
JavaScript (84.43%)
Less (15.57%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
543 Commits
12 Watchers
20 Branches
20 Contributors
Updated on Sep 02, 2022
Latest Version
1.1.24
Package Id
@app-elements/connect@1.1.24
Unpacked Size
7.86 kB
Size
2.95 kB
File Count
4
NPM Version
lerna/3.22.1/node@v14.5.0+x64 (darwin)
Node Version
14.5.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
deprecated in favour of useMappedState and useRequest
Convenience HoC that connects withState and withRequest. Also offers a way to create actions and a reducer.
npm install --save @app-elements/connect
1import connect from '@app-elements/connect' 2 3// Here is are view for rendering that data 4const PeopleList = ({ result }) => 5 <div> 6 // Do something with `result` 7 </div> 8 9// Now we use connect to wrap the PeopleList component 10// in a Higher order Component (HoC) that, in this case, 11// will sync state changes and perform an API request. 12const enhance = connect({ 13 // Let's say we have another Component somewhere that let's 14 // the user specify filter options for what people to display. 15 withState: ({ peopleFilters }) => ({ peopleFilters }), 16 withRequest: { 17 // We will use the state property we accessed with `withState` 18 // to modify the endpoint we want to request. 19 endpoint: ({ peopleFilters }) => ({ 20 endpoint: `users?${qs.stringify(peopleFilters, '', true)}` 21 }) 22 } 23}) 24 25// Since connect is a HoC, it returns a function that expects 26// to be called with a Component as its only param. 27export default enhance(PeopleList)
A convenient way to define actions and automatically create a reducer that handles them. The reducer is only defined once and passed to the store once.
1const Dropdown = connect({ 2 // Each property on this object will result in a function of the same name 3 // being created and included in the props given to the PassedComponent. 4 withActions: { 5 // Each value should be a function that accepts `(currentState, [...args])` 6 // `args` will be any arguments you provide when you call the function in 7 // your PassedComponent. For example, on a click handler you would call: 8 // `toggle(this.props.uid)` 9 toggle: ({dropdown}, uid) => { 10 const isOpen = dropdown === uid 11 return {dropdown: isOpen ? null : uid} 12 } 13 }, 14 15})(DropdownView)
Prop | Type | Default | Description |
---|---|---|---|
withActions | Object | None | An object where each child is a function that returns an object to mutate state with |
withState | Function | None | A function that accepts (state, props) and returns an object |
withRequest | Object | None | An object that accepts the props { endpoint, parse } , where endpoint is the url to call, or a function that returns a the url to call |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
71 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More