├── .gitattributes ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── babel.config.js ├── build ├── index.d.ts ├── index.js └── index.js.map ├── package.json ├── src ├── __tests__ │ ├── __snapshots__ │ │ └── index-test.tsx.snap │ └── index-test.tsx └── index.ts ├── tsconfig.json └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/**/* 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | screenshots/ 4 | npm-debug.log 5 | example/ 6 | secret/ 7 | *.tgz 8 | babel.config.js 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Evan Bacon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![NPM](https://nodei.co/npm/react-native-fastest-image.png)](https://nodei.co/npm/react-native-fastest-image/) 2 | 3 | # react-native-fastest-image 4 | 5 | The fastest most reliable Image component for React Native. Don't @ me. This module can be used as a drop-in replacement for react-native's `Image` component. 6 | 7 | ## Installation 8 | 9 | ```bash 10 | yarn add react-native-fastest-image 11 | ``` 12 | 13 | ## Usage 14 | 15 | Import the library into your JavaScript file: 16 | 17 | ```js 18 | import Image from 'react-native-fastest-image'; 19 | 20 | function App() { 21 | return ; 22 | } 23 | ``` 24 | 25 | ## Example 26 | 27 | You can see a full example in this [**snack**](https://snack.expo.io/@bacon/react-native-fastest-image) 28 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | // @generated by expo-module-scripts 2 | module.exports = require('expo-module-scripts/babel.config.base'); 3 | -------------------------------------------------------------------------------- /build/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Image } from 'react-native'; 2 | export default Image; 3 | export { Image }; 4 | -------------------------------------------------------------------------------- /build/index.js: -------------------------------------------------------------------------------- 1 | import { Image } from 'react-native'; 2 | export default Image; 3 | export { Image }; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /build/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import { Image } from 'react-native';\nexport default Image;\nexport { Image };"]} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-fastest-image", 3 | "version": "100.0.0", 4 | "sideEffects": true, 5 | "description": "The fastest most reliable Image component for React Native", 6 | "main": "build/index.js", 7 | "types": "build/index.d.ts", 8 | "homepage": "https://github.com/EvanBacon/react-native-fastest-image#readme", 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/EvanBacon/react-native-fastest-image.git" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/EvanBacon/react-native-fastest-image/issues" 15 | }, 16 | "scripts": { 17 | "build": "expo-module build", 18 | "clean": "expo-module clean", 19 | "test": "jest", 20 | "prepare": "expo-module prepare", 21 | "prepublishOnly": "expo-module prepublishOnly", 22 | "expo-module": "expo-module" 23 | }, 24 | "keywords": [ 25 | "react-native", 26 | "image", 27 | "react-native-fast-image", 28 | "lol-flutter" 29 | ], 30 | "author": "Evan Bacon", 31 | "license": "MIT", 32 | "jest": { 33 | "preset": "react-native" 34 | }, 35 | "peerDependencies": { 36 | "react-native": "*" 37 | }, 38 | "devDependencies": { 39 | "expo-module-scripts": "^1.0.1", 40 | "jest-expo": "^34.0.0", 41 | "react": "^16.9.0", 42 | "react-native": "^0.60.5", 43 | "react-test-renderer": "^16.9.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/index-test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`lmao 1`] = ``; 4 | -------------------------------------------------------------------------------- /src/__tests__/index-test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Image from '..'; 3 | 4 | import renderer from 'react-test-renderer'; 5 | 6 | test(`lmao`, () => { 7 | expect(renderer.create().toJSON()).toMatchSnapshot(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { Image } from 'react-native'; 2 | export default Image; 3 | export { Image }; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | // @generated by expo-module-scripts 2 | { 3 | "extends": "expo-module-scripts/tsconfig.base", 4 | "compilerOptions": { 5 | "outDir": "./build" 6 | }, 7 | "include": ["./src"], 8 | "exclude": ["**/__mocks__/*", "**/__tests__/*"] 9 | } 10 | --------------------------------------------------------------------------------