![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
react-native-elastic-stack
Advanced tools
React Native component that implement elastic stack effect
$ npm install react-native-elastic-stack --save
| |
|
|
|
import ParallaxScroll from 'react-native-elastic-stack';
// Inside of a component's render() method:
render() {
return (
<ElasticStack
items={Array.from({ length: 5 }).map(
(_, i) => `http://lorempixel.com/640/480/city/?item=${i}`,
)}
itemWidth={itemWidth}
itemHeight={itemHeight}
renderItem={url => <Item image={url} width={itemWidth} height={itemHeight} />}
elastickRange={0.9}
elastickItemsCount={5}
/>
);
}
Please clone the repo and run npm run storybook
or yarn storybook
to show examples of usages.
onPanResponderGrant: PropTypes.func, onPanResponderRelease: PropTypes.func,
Property | Type | Defaut | Description |
---|---|---|---|
style | object | {} | Component's styles. |
items | array | [] | Array of data for the items to be rendered. |
onSwiped | func | (itemIndex) => {} | Function to be called when a item is swiped. |
infinite | bool | false | Keep swiping indefinitely. |
distDrag | number | 70 | If the user stops dragging the image in a area that does not exceed for either x or y then the image goes back to the stack. |
onXChange | func | () => {) | Function to be called when x of current item changed. |
onYChange | func | () => {} | Function to be called when y of current item changed |
itemWidth | number | Dimensions.get('window').width * 0.8 | This is the width of the item. |
itemHeight | number | Dimensions.get('window').height * 0.8 | This is the width of the item. |
directions | array | [true, true, true, true] | Supported directions([top, right, bottom, left]) in which items can swipe out. |
renderItem | func | (itemData, itemWidth, itemHeight) => {} | Function to render the item based on the data. |
onSwipedTop | func | (itemIndex) => {} | Function to be called when a item is swiped top. |
onSwipedLeft | func | (itemIndex) => {} | Function to be called when a item is swiped left. |
onStackEnded | func | () => {} | Function to be called when stack is ended. |
reduceScaleBy | number | 0.05 | The value by which the next item should decrease. |
onSwipedRight | func | (itemIndex) => {} | Function to be called when a item is swiped right. |
elastickRange | number | 0.5 | The value of the elastic of items. |
onSwipedBottom | func | (itemIndex) => {} | Function to be called when a item is swiped bottom. |
reduceOpacityBy | number | 0.2 | The value by which the next item should be more transparent. |
activeItemIndex | number | 0 | Default item index. |
elastickItemsCount | number | 3 | Count of items rendered at the same time. |
onPanResponderGrant | func | () => {} | |
onPanResponderRelease | func | () => {} |
I welcome contributions! Please open an issues if you have any feature ideas or find any bugs. I also accept pull requests with open arms. I will go over the issues when I have time. :)
FAQs
Elastic stack for React Native
The npm package react-native-elastic-stack receives a total of 0 weekly downloads. As such, react-native-elastic-stack popularity was classified as not popular.
We found that react-native-elastic-stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.