@fluentui/react-context-selector
Advanced tools
Comparing version
@@ -5,6 +5,36 @@ { | ||
{ | ||
"date": "Wed, 31 Mar 2021 00:47:26 GMT", | ||
"date": "Thu, 22 Apr 2021 07:31:20 GMT", | ||
"tag": "@fluentui/react-context-selector_v9.0.0-alpha.3", | ||
"version": "9.0.0-alpha.3", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"comment": "use useIsomorphicEffect from @fluentui/react-utilities", | ||
"author": "olfedias@microsoft.com", | ||
"commit": "7feded422987e9c82f3250f419ab62118a52f9d4", | ||
"package": "@fluentui/react-context-selector" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Mon, 19 Apr 2021 07:33:33 GMT", | ||
"tag": "@fluentui/react-context-selector_v9.0.0-alpha.2", | ||
"version": "9.0.0-alpha.2", | ||
"comments": { | ||
"none": [ | ||
{ | ||
"comment": "Remove unneeded react-app-polyfill devDependency", | ||
"author": "elcraig@microsoft.com", | ||
"commit": "fdc32557d49e5d70ea7e4af8957102d415b44547", | ||
"package": "@fluentui/react-context-selector" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 31 Mar 2021 00:53:43 GMT", | ||
"tag": "@fluentui/react-context-selector_v9.0.0-alpha.2", | ||
"version": "9.0.0-alpha.2", | ||
"comments": { | ||
"patch": [ | ||
@@ -11,0 +41,0 @@ { |
# Change Log - @fluentui/react-context-selector | ||
This log was last generated on Wed, 31 Mar 2021 00:47:26 GMT and should not be manually modified. | ||
This log was last generated on Thu, 22 Apr 2021 07:31:20 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.3) | ||
Thu, 22 Apr 2021 07:31:20 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.2..@fluentui/react-context-selector_v9.0.0-alpha.3) | ||
### Changes | ||
- use useIsomorphicEffect from @fluentui/react-utilities ([PR #17897](https://github.com/microsoft/fluentui/pull/17897) by olfedias@microsoft.com) | ||
## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-context-selector_v9.0.0-alpha.2) | ||
Wed, 31 Mar 2021 00:47:26 GMT | ||
Wed, 31 Mar 2021 00:53:43 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-context-selector_v9.0.0-alpha.1..@fluentui/react-context-selector_v9.0.0-alpha.2) | ||
@@ -11,0 +20,0 @@ |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", "react", "./utils"], function (require, exports, React, utils_1) { | ||
define(["require", "exports", "@fluentui/react-utilities", "react", "scheduler"], function (require, exports, react_utilities_1, React, scheduler_1) { | ||
"use strict"; | ||
@@ -19,6 +19,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
utils_1.useIsomorphicLayoutEffect(function () { | ||
react_utilities_1.useIsomorphicLayoutEffect(function () { | ||
valueRef.current = props.value; | ||
versionRef.current += 1; | ||
utils_1.runWithNormalPriority(function () { | ||
scheduler_1.unstable_runWithPriority(scheduler_1.unstable_NormalPriority, function () { | ||
contextValue.current.listeners.forEach(function (listener) { | ||
@@ -25,0 +25,0 @@ listener([versionRef.current, props.value]); |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", "react", "./utils"], function (require, exports, React, utils_1) { | ||
define(["require", "exports", "@fluentui/react-utilities", "react"], function (require, exports, react_utilities_1, React) { | ||
"use strict"; | ||
@@ -45,3 +45,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
utils_1.useIsomorphicLayoutEffect(function () { | ||
react_utilities_1.useIsomorphicLayoutEffect(function () { | ||
listeners.push(dispatch); | ||
@@ -48,0 +48,0 @@ return function () { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_utilities_1 = require("@fluentui/react-utilities"); | ||
var React = require("react"); | ||
var utils_1 = require("./utils"); | ||
var scheduler_1 = require("scheduler"); | ||
var createProvider = function (Original) { | ||
@@ -20,6 +21,6 @@ var Provider = function (props) { | ||
} | ||
utils_1.useIsomorphicLayoutEffect(function () { | ||
react_utilities_1.useIsomorphicLayoutEffect(function () { | ||
valueRef.current = props.value; | ||
versionRef.current += 1; | ||
utils_1.runWithNormalPriority(function () { | ||
scheduler_1.unstable_runWithPriority(scheduler_1.unstable_NormalPriority, function () { | ||
contextValue.current.listeners.forEach(function (listener) { | ||
@@ -26,0 +27,0 @@ listener([versionRef.current, props.value]); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_utilities_1 = require("@fluentui/react-utilities"); | ||
var React = require("react"); | ||
var utils_1 = require("./utils"); | ||
/** | ||
@@ -46,3 +46,3 @@ * This hook returns context selected value by selector. | ||
} | ||
utils_1.useIsomorphicLayoutEffect(function () { | ||
react_utilities_1.useIsomorphicLayoutEffect(function () { | ||
listeners.push(dispatch); | ||
@@ -49,0 +49,0 @@ return function () { |
@@ -0,3 +1,4 @@ | ||
import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities'; | ||
import * as React from 'react'; | ||
import { runWithNormalPriority, useIsomorphicLayoutEffect } from './utils'; | ||
import { unstable_NormalPriority as NormalPriority, unstable_runWithPriority as runWithPriority } from 'scheduler'; | ||
var createProvider = function (Original) { | ||
@@ -21,3 +22,3 @@ var Provider = function (props) { | ||
versionRef.current += 1; | ||
runWithNormalPriority(function () { | ||
runWithPriority(NormalPriority, function () { | ||
contextValue.current.listeners.forEach(function (listener) { | ||
@@ -24,0 +25,0 @@ listener([versionRef.current, props.value]); |
@@ -0,3 +1,3 @@ | ||
import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities'; | ||
import * as React from 'react'; | ||
import { useIsomorphicLayoutEffect } from './utils'; | ||
/** | ||
@@ -4,0 +4,0 @@ * This hook returns context selected value by selector. |
{ | ||
"name": "@fluentui/react-context-selector", | ||
"version": "9.0.0-alpha.2", | ||
"version": "9.0.0-alpha.3", | ||
"description": "React useContextSelector hook in userland", | ||
@@ -27,2 +27,3 @@ "main": "lib-commonjs/index.js", | ||
"@fluentui/scripts": "^1.0.0", | ||
"@types/scheduler": "^0.16.1", | ||
"@types/react": "16.9.42", | ||
@@ -32,3 +33,2 @@ "@types/react-dom": "16.9.10", | ||
"react": "16.8.6", | ||
"react-app-polyfill": "~1.0.1", | ||
"react-dom": "16.8.6", | ||
@@ -39,3 +39,3 @@ "react-is": "^16.6.3", | ||
"dependencies": { | ||
"@types/scheduler": "^0.16.1", | ||
"@fluentui/react-utilities": "^9.0.0-alpha.18", | ||
"scheduler": "^0.20.1", | ||
@@ -42,0 +42,0 @@ "tslib": "^1.10.0" |
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
69135
-3.79%47
-16.07%680
-0.58%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed