Socket
Socket
Sign inDemoInstall

react-native-fast-toast

Package Overview
Dependencies
0
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.3.1

2

lib/commonjs/hook/context.js

@@ -12,3 +12,3 @@ "use strict";

const ToastContext = /*#__PURE__*/_react.default.createContext(null);
const ToastContext = /*#__PURE__*/_react.default.createContext({});

@@ -15,0 +15,0 @@ var _default = ToastContext;

@@ -27,3 +27,3 @@ "use strict";

const toastRef = (0, _react.useRef)(null);
const [refState, setRefState] = (0, _react.useState)(null);
const [refState, setRefState] = (0, _react.useState)({});
(0, _react.useEffect)(() => {

@@ -30,0 +30,0 @@ setRefState(toastRef.current);

import React from "react";
const ToastContext = /*#__PURE__*/React.createContext(null);
const ToastContext = /*#__PURE__*/React.createContext({});
export default ToastContext;
//# sourceMappingURL=context.js.map

@@ -12,3 +12,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

const toastRef = useRef(null);
const [refState, setRefState] = useState(null);
const [refState, setRefState] = useState({});
useEffect(() => {

@@ -15,0 +15,0 @@ setRefState(toastRef.current);

import React from "react";
declare const ToastContext: React.Context<import("../toast-container").default | null>;
import ToastContainer from "../toast-container";
export declare type ToastType = Pick<ToastContainer, "show" | "update" | "hide">;
declare const ToastContext: React.Context<Pick<ToastContainer, "show" | "update" | "hide">>;
export default ToastContext;

@@ -0,0 +0,0 @@ import { FC } from "react";

@@ -1,2 +0,3 @@

declare const useToast: () => import("../toast-container").default | null;
import { ToastType } from "./context";
declare const useToast: () => ToastType;
export default useToast;
export { default } from "./toast-container";
export { default as ToastProvider } from "./hook/provider";
export { default as useToast } from "./hook/useToast";
export type { ToastType } from './hook/context';

@@ -0,0 +0,0 @@ import { Component } from "react";

@@ -0,0 +0,0 @@ import { FC } from "react";

{
"name": "react-native-fast-toast",
"version": "2.3.0",
"version": "2.3.1",
"main": "lib/commonjs/index.js",

@@ -5,0 +5,0 @@ "module": "lib/module/index.js",

@@ -135,2 +135,3 @@ # react-native-fast-toast

warningColor="orange"
normalColor="gray"
/>

@@ -137,0 +138,0 @@ ```

import React from "react";
import ToastContainer from "../toast-container";
type Toast = React.RefObject<import("../toast-container").default>["current"];
export type ToastType = Pick<ToastContainer, "show" | "update" | "hide">;
const ToastContext = React.createContext(null as Toast);
const ToastContext = React.createContext({} as ToastType);
export default ToastContext;
import { useContext } from "react";
import ToastContext from "./context";
import ToastContext, { ToastType } from "./context";
const useToast = () => useContext(ToastContext);
const useToast = (): ToastType => useContext(ToastContext);
export default useToast;
export { default } from "./toast-container";
export { default as ToastProvider } from "./hook/provider";
export { default as useToast } from "./hook/useToast";
export type {ToastType} from './hook/context'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc