npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-fileview

v0.0.8

Published

<!-- ![star this repo](https://img.shields.io/github/stars/react-native-webview/react-native-webview?style=flat-square) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![NPM Versio

Downloads

520

Readme

React Native Fileview

The FileViewer component is a React Native interface designed to display various file types seamlessly within a mobile application. It leverages the capabilities of the WebView component to render both documents (such as PDFs and Word files) and images directly from a provided URL.

Many thanks to these companies for providing us with time to work on open source.
Please note that maintainers spend a lot of free time working on this too so feel free to sponsor them, it really makes a difference.

  • [Madhusudhan] from [React Native for SS] for helping a lot with the repo when he had more available time.
  • [Bharanikumar] from [Team Lead @ SS] for helping a lot with the repo when he had more available time.

Disclaimer

Dynamic File Handling: Automatically determines the type of file (document or image) based on the file extension and displays it accordingly.

Google Docs Integration: For document files, it utilizes Google Docs Viewer to render files efficiently, ensuring compatibility with a wide range of document formats.

Inline Image Rendering: For image files, the component embeds the image in a simple HTML structure, providing a smooth viewing experience without downloading the image.

Caching Support: Implements caching to enhance loading speed for subsequent views of the same file, minimizing network calls and improving performance.

Loading Indicator: Displays a loading spinner while the file is being fetched, enhancing user experience by providing visual feedback during loading times.

Platform compatibility

This project is compatible with iOS, Android, Windows and macOS.
This project supports both the old (paper) and the new architecture (fabric).

Usage

Import the FileView component from react-native-fileview and use it like so:

import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";
import FileView from "react-native-fileview";

// ...
const App = () => {
  return <FileView source={"https://gbihr.org/images/docs/test.pdf"} />;
};

The FileViewer component accepts a source prop, which should be a string URL pointing to the file to be displayed. Depending on the file type, it will either load the document in Google Docs Viewer or render the image inline.

License

SS