New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blac/react

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blac/react - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

10

dist/blac-react.d.ts
import { Blac, BlocBase, ValueType, BlocClass } from 'blac';
import React from 'react';
import React, { FC, ReactNode } from 'react';

@@ -17,2 +17,8 @@ declare const BlacContext: React.Context<Blac<any, any> | null>;

declare const BlocProvider: FC<{
children?: ReactNode;
bloc: (() => BlocBase<any>) | BlocBase<any>;
debug?: boolean;
}>;
interface ExternalStore<B extends BlocBase<any>> {

@@ -37,2 +43,2 @@ subscribe: (onStoreChange: () => void) => () => void;

export { BlacContext, BlocHookData, BlocHookOptions, ExternalStore, ProviderItem, useBloc };
export { BlacContext, BlocHookData, BlocHookOptions, BlocProvider, ExternalStore, ProviderItem, useBloc };

11

dist/blac-react.esm.js

@@ -138,2 +138,11 @@ import React, { useContext, useMemo, useEffect, createContext, useSyncExternalStore } from 'react';

const BlocProvider = ({ children, bloc, debug }) => {
const blacReact = BlacReact.getInstance();
const providerId = blacReact.useLocalProvider({ bloc, debug });
if (!providerId) {
return null;
}
return (React.createElement(blacReact.LocalProvider, { value: providerId }, children));
};
const externalBlocStore = (bloc) => {

@@ -196,3 +205,3 @@ return {

export { BlacContext, useBloc };
export { BlacContext, BlocProvider, useBloc };
//# sourceMappingURL=blac-react.esm.js.map

@@ -140,2 +140,11 @@ 'use strict';

const BlocProvider = ({ children, bloc, debug }) => {
const blacReact = BlacReact.getInstance();
const providerId = blacReact.useLocalProvider({ bloc, debug });
if (!providerId) {
return null;
}
return (React.createElement(blacReact.LocalProvider, { value: providerId }, children));
};
const externalBlocStore = (bloc) => {

@@ -199,3 +208,4 @@ return {

exports.BlacContext = BlacContext;
exports.BlocProvider = BlocProvider;
exports.useBloc = useBloc;
//# sourceMappingURL=blac-react.js.map
{
"name": "@blac/react",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/blac-react.js",

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc