@freakycoder/react-native-progressive-fast-image

中文文档
1.0.0发布于 2023/04/05MITTypeScriptCommonJS近 30 天下载 4741

Customizable progressive image for React Native with FastImage

原始使用文档
文档目录9 节
  1. Peer Dependencies
  2. Import
  3. Fundamental Usage
  4. loadingImageComponent Usage
  5. Customization Props
  6. Future Plans
  7. Better with built-in bug fix
  8. Author
  9. License
React Native Progressive Fast Image

Battle Tested ✅

Customizable progressive image for React Native with FastImage

npm version npm Platform - Android and iOS License: MIT styled with prettier

Progressive Fast Image Built-in Loading Progressive Fast Image
React Native Progressive Fast Image React Native Progressive Fast Image

Installation

Add the dependency:

npm i @freakycoder/react-native-progressive-fast-image

Peer Dependencies

IMPORTANT! You need install them
"react-native-fast-image": ">= 8.3.2"

Usage

Import

import ProgressiveFastImage from "@freakycoder/react-native-progressive-fast-image";

Fundamental Usage

It accepts every Image and FastImage props. You can use it like you used to.

<ProgressiveFastImage
  source={require("./assets/my-image.png")}
  thumbnailSource={require("./assets/my-image.png")}
/>

Configuration - Props

PropertyTypeDefaultDescription
sourceSourceundefinedset the main source of the image
thumbnailSourceImageSourcePropTypeundefinedset the thumbnail source of the image
loadingSourceImageSourcePropTypeundefinedset the error source of the image
errorSourceImageSourcePropTypeundefinedset the loading source of the image
loadingImageComponentComponentdefaultWARNING: Read the below!
blurRadiusnumber15change the blur radius level

loadingImageComponent Usage

If you want to set your own component for the loading image, you should set this style for the top of the component

{
  top: 0,
  left: 0,
  right: 0,
  bottom: 0,
  position: "absolute",
  alignItems: "center",
  alignSelf: "center",
  justifyContent: "center",
}

Customization Props

PropertyTypeDefaultDescription
stylestyledefaultchange or override main image style
loadingImageContainerStylestyledefaultchange or override loading image container style
loadingImageStylestyledefaultchange or override loading image style
thumbnailImageStylestyledefaultchange or override thumbnail image style
thumbnailAnimationDurationnumberdefaultchange the thumbnail animation's duration
imageAnimationDurationnumberdefaultchange the main image animation's duration
onLoadfunctiondefaultcalling the onLoad
onThumbnailLoadfunctiondefaultcalling the onThumbnailLoad
onLoadEndfunctiondefaultcalling the onLoadEnd
onErrorfunctiondefaultcalling the onError

Future Plans

  • LICENSE
  • Built-in Loading Indicator
  • Built-in Error Image Source
  • Write an article about the lib on Medium

Better with built-in bug fix

Fixes FastImage's source null bug-fix.

Author

FreakyCoder, [email protected]

License

React Native Progressive Fast Image is available under the MIT license. See the LICENSE file for more info.


版本与发布记录

@freakycoder/react-native-progressive-fast-image 共发布 8 个版本,首次发布于 2020/08/25;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.0latest2023/04/053 年前
0.2.52021/08/095 年前
0.2.42021/05/145 年前
0.2.22021/01/215 年前
0.2.12020/11/205 年前
0.2.02020/11/205 年前

关于 @freakycoder/react-native-progressive-fast-image 的常见问题

@freakycoder/react-native-progressive-fast-image 是什么?

Customizable progressive image for React Native with FastImage

如何安装 @freakycoder/react-native-progressive-fast-image?

在项目目录运行 npm install @freakycoder/react-native-progressive-fast-image,或使用 pnpm add / yarn add / bun add。

@freakycoder/react-native-progressive-fast-image 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@freakycoder/react-native-progressive-fast-image 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@freakycoder/react-native-progressive-fast-image 可以商用吗?

@freakycoder/react-native-progressive-fast-image 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@freakycoder/react-native-progressive-fast-image 的下载量有多少?

根据 npm 官方下载统计,@freakycoder/react-native-progressive-fast-image 在 2026/10/16 – 2026/11/14 这 30 天内被下载 4,741 次,日均约 158 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@freakycoder/react-native-progressive-fast-image 还在维护吗?

最新版本 1.0.0 发布于 2023/04/05(3 年前);至今共发布 8 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/08/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。