What is SafeView?

SafeView is a component that allows you to hide sensitive information in your app visually, for presentation purposes, and more.

How to install:

npm install safeview

In order to hide an element all you need to do is to target it using the data-safe attribute.

const Component = () => {
    return (
        <div>
            <span data-safe>
                // Sensitive info
            <span>
        </div>
    )
}
import SafeView from 'safeview';

const App = () => {
  return (
        <SafeView>
            // Your React App
        </SafeView>;
  )
};

Reference:

  1. safeview - npm

My site is free of ads and trackers. Was this post helpful to you? Why not BuyMeACoffee