profile
viewpoint
Heaven NE-SmallTown 社交账号/微信已弃用,feel free to email Nowhere, China @Web-performance. @animation. @HTML/ECMA-spec. @data-drive. @react. @components. Love movie, music. Maybe change something in the future.

NE-SmallTown/my-understanding-of-react 4

Add my understanding of React src code with comments

NE-SmallTown/React-DigInto 2

Try to analyze and explain react src code(based on react@16)

NE-SmallTown/ant-design 0

🐜 A UI Design Language

NE-SmallTown/ant-design-jQuery 0

implement parts of ant-design by jQuery

NE-SmallTown/awesome-mobile-shits 0

Like https://github.com/RubyLouvre/mobileHack

NE-SmallTown/babel-plugin-react-css-modules 0

Transforms styleName to className using compile time CSS module resolution.

NE-SmallTown/build-your-own-mint 0

Build your own personal finance analytics using Plaid, Google Sheets and CircleCI.

NE-SmallTown/checkbox 0

React Checkbox

NE-SmallTown/component-compiler-utils 0

Lower level utilities for compiling Vue single file components

startedthibautjombart/covid19_bed_occupancy

started time in a day

startedCEIDatUGA/COVID-stochastic-fitting

started time in a day

startedvuejs/vue-next

started time in a day

startedsjspielman/datascience_final_assignment

started time in a day

startedacdlite/flummox

started time in 2 days

startedreact-europe/react-europe-mobile

started time in 2 days

startedvitejs/vite

started time in 2 days

startedTKkk-iOSer/WeChatPlugin-MacOS

started time in 3 days

startedpifafu/.github

started time in 3 days

startedtimriffe/covid_age

started time in 3 days

startedcode-hike/codehike

started time in 3 days

startedpikapkg/snowpack

started time in 3 days

startedbrick-design/react-visual-editor

started time in 3 days

startedtreadpit/wx_calendar

started time in 3 days

startedryansolid/vuerx-jsx

started time in 3 days

startedcyanharlow/purecss-gaze

started time in 3 days

startedhelloflask/discuss

started time in 4 days

startedpopperjs/popper-core

started time in 4 days

startedcuth/postcss-pxtorem

started time in 4 days

startedjquense/yup

started time in 6 days

startedshanggqm/blog

started time in 6 days

startedawto/effectfuljs

started time in 7 days

startedtc39/proposal-logical-assignment

started time in 7 days

startedhakimel/reveal.js

started time in 7 days

startedCatalystCode/react-native-azurenotificationhub

started time in 7 days

startedlayabox/LayaAir

started time in 7 days

startedblinksh/blink

started time in 7 days

startedmedo64/Render-CRLF

started time in 8 days

startedaedobbyn/covid19us

started time in 8 days

startedvideo-dev/can-autoplay

started time in 9 days

startedruanyf/weekly

started time in 9 days

startedWechatFE/wechatfe.github.io

started time in 9 days

startedzenangst/Gray

started time in 10 days

startedzygurt/TSM

started time in 10 days

startedxz/new.css

started time in 12 days

CommitCommentEvent

startedakiran/react-slick

started time in 13 days

startedWICG/digital-goods

started time in 15 days

startedfacebookexperimental/Recoil

started time in 17 days

startedbrodybits/create-react-native-module

started time in 17 days

startedkatanala/lovers-website

started time in 18 days

startedwix/react-native-navigation

started time in 18 days

starteddbeaver/dbeaver

started time in 18 days

startedGoogleChrome/CrUX

started time in 19 days

startedfacebook/metro

started time in 19 days

startedRamiKrispin/covid19Italy

started time in 19 days

startedastrit/css.gg

started time in 20 days

CommitCommentEvent

startedtearill/Reading_Record

started time in 20 days

startedwkhtmltopdf/wkhtmltopdf

started time in 20 days

startedCEIDatUGA/COVID-19-DATA

started time in 20 days

startedfacebook/react-native

started time in 20 days

startedintel/haxm

started time in 20 days

startedyelouafi/create-a-simple-functional-language

started time in 21 days

startedoblador/react-native-animatable

started time in 21 days

startedsplitbee/react-notion

started time in 22 days

startedandroid-hacker/VirtualXposed

started time in 22 days

startedkristerkari/css-to-react-native-transform

started time in 22 days

startediovisor/bpf-docs

started time in 22 days

starteddoyoe/react-native-stylesheet-guide

started time in 23 days

startedMITDDC/zork

started time in 23 days

startedstyled-components/css-to-react-native

started time in 24 days

startedsethfowler/chromium-trace-analyzer

started time in 25 days

startedafshinea/stanford-cs-229-machine-learning

started time in 25 days

startedbuptwsgprivate/iOSInterview

started time in 25 days

startedGoogleChrome/web-vitals

started time in 25 days

startedrOpenStats/COVID19analytics

started time in a month

startedfitzgen/peepmatic

started time in a month

issue openedbabel/babel

Should we combine the transform-runtime and preset-env in an application?

Question 1

I find that there are many unnecessary duplications in the (webpack) bundle (output)result, to be specific, they all are the helpers(like classCheck, objectSpread(due to the object-spread plugin).

So, I want to reduce the duplications. If it's a library, sure, I will use transform-runtime plugin(refer to runtime-corejs3) to do this. But now this is an application, so, what's the correct way to do this?

Therefor I'm getting confused because the transfrom-runtime plugin is recommended for library(and is for the whole reduction. i.e. core-js, regenerator and the helpers). But here I just want to reduce the helper duplications, not others duplications because that has been done by babel/env.

So here the question I want to ask/discuss is that is it necessary to reduce the helpers duplications in an application, if yes, and how?

Question 2

The other question is, core-js/modules/es.promise.js and core-js-pure/modules/es.promise.js are exactly the same code, the main difference just is that the former has global pollution? If so, why core-js doesn't use(directly import) core-js-pure to polyfill and then add it to global? IMO, this will greatly reduce the duplications because at now the libs use transform-runtime(finally core-js-pure) but apps use preset-env(finally core-js), there is no shared/shareable codes between apps and libs, right?

created time in a month

startedcoturn/coturn

started time in a month

Pull request review commentfacebook/react

Initial Lanes implementation

  * @flow  */ -export opaque type LanePriority = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;--export const SyncLanePriority: LanePriority = 10;-export const SyncBatchedLanePriority: LanePriority = 9;-export const InputDiscreteLanePriority: LanePriority = 8;-export const InputContinuousLanePriority: LanePriority = 7;-export const DefaultLanePriority: LanePriority = 6;-export const TransitionShortLanePriority: LanePriority = 5;-export const TransitionLongLanePriority: LanePriority = 4;-export const HydrationContinuousLanePriority: LanePriority = 3;-export const IdleLanePriority: LanePriority = 2;-export const OffscreenLanePriority: LanePriority = 1;-export const NoLanePriority: LanePriority = 0;+import type {FiberRoot, ReactPriorityLevel} from './ReactInternalTypes';++export opaque type LanePriority =+  | 0+  | 1+  | 2+  | 3+  | 4+  | 5+  | 6+  | 7+  | 8+  | 9+  | 10+  | 11+  | 12+  | 13+  | 14+  | 15+  | 16;+export opaque type Lanes = number;+export opaque type Lane = number;++import invariant from 'shared/invariant';++import {+  ImmediatePriority as ImmediateSchedulerPriority,+  UserBlockingPriority as UserBlockingSchedulerPriority,+  NormalPriority as NormalSchedulerPriority,+  LowPriority as LowSchedulerPriority,+  IdlePriority as IdleSchedulerPriority,+  NoPriority as NoSchedulerPriority,+} from './SchedulerWithReactIntegration.new';++export const SyncLanePriority: LanePriority = 16;+const SyncBatchedLanePriority: LanePriority = 15;++const InputDiscreteHydrationLanePriority: LanePriority = 14;+export const InputDiscreteLanePriority: LanePriority = 13;++const InputContinuousHydrationLanePriority: LanePriority = 12;+const InputContinuousLanePriority: LanePriority = 11;++const DefaultHydrationLanePriority: LanePriority = 10;+const DefaultLanePriority: LanePriority = 9;++const TransitionShortHydrationLanePriority: LanePriority = 8;+export const TransitionShortLanePriority: LanePriority = 7;++const TransitionLongHydrationLanePriority: LanePriority = 6;+export const TransitionLongLanePriority: LanePriority = 5;++const SelectiveHydrationLanePriority: LanePriority = 4;++const IdleHydrationLanePriority: LanePriority = 3;+const IdleLanePriority: LanePriority = 2;++const OffscreenLanePriority: LanePriority = 1;++const NoLanePriority: LanePriority = 0;++const TotalLanes = 31;++export const NoLanes: Lanes = /*                        */ 0b0000000000000000000000000000000;+export const NoLane: Lane = /*                          */ 0b0000000000000000000000000000000;++export const SyncLane: Lane = /*                        */ 0b0000000000000000000000000000001;+const SyncUpdateRangeEnd = 1;+export const SyncBatchedLane: Lane = /*                 */ 0b0000000000000000000000000000010;+const SyncBatchedUpdateRangeEnd = 2;++export const InputDiscreteHydrationLane: Lane = /*      */ 0b0000000000000000000000000000100;+const InputDiscreteLanes: Lanes = /*                    */ 0b0000000000000000000000000011100;+const InputDiscreteUpdateRangeStart = 3;+const InputDiscreteUpdateRangeEnd = 5;++const InputContinuousHydrationLane: Lane = /*           */ 0b0000000000000000000000000100000;+const InputContinuousLanes: Lanes = /*                  */ 0b0000000000000000000000011100000;+const InputContinuousUpdateRangeStart = 6;+const InputContinuousUpdateRangeEnd = 8;++export const DefaultHydrationLane: Lane = /*            */ 0b0000000000000000000000100000000;+const DefaultLanes: Lanes = /*                          */ 0b0000000000000000011111100000000;+const DefaultUpdateRangeStart = 9;+const DefaultUpdateRangeEnd = 14;++const TransitionShortHydrationLane: Lane = /*           */ 0b0000000000000000100000000000000;+const TransitionShortLanes: Lanes = /*                  */ 0b0000000000011111100000000000000;+const TransitionShortUpdateRangeStart = 15;+const TransitionShortUpdateRangeEnd = 20;++const TransitionLongHydrationLane: Lane = /*            */ 0b0000000000100000000000000000000;+const TransitionLongLanes: Lanes = /*                   */ 0b0000011111100000000000000000000;+const TransitionLongUpdateRangeStart = 21;+const TransitionLongUpdateRangeEnd = 26;++export const SelectiveHydrationLane: Lane = /*          */ 0b0000110000000000000000000000000;+const SelectiveHydrationRangeEnd = 27;++// Includes all non-Idle updates+const UpdateRangeEnd = 27;+const NonIdleLanes = /*                                 */ 0b0000111111111111111111111111111;++export const IdleHydrationLane: Lane = /*               */ 0b0001000000000000000000000000000;+const IdleLanes: Lanes = /*                             */ 0b0111000000000000000000000000000;+const IdleUpdateRangeStart = 28;+const IdleUpdateRangeEnd = 30;++export const OffscreenLane: Lane = /*                   */ 0b1000000000000000000000000000000;++// "Registers" used to "return" multiple values+// Used by getHighestPriorityLanes and getNextLanes:+let return_highestLanePriority: LanePriority = DefaultLanePriority;+let return_updateRangeEnd: number = -1;++function getHighestPriorityLanes(lanes: Lanes | Lane): Lanes {+  if ((SyncLane & lanes) !== NoLanes) {+    return_highestLanePriority = SyncLanePriority;+    return_updateRangeEnd = SyncUpdateRangeEnd;+    return SyncLane;+  }+  if ((SyncBatchedLane & lanes) !== NoLanes) {+    return_highestLanePriority = SyncBatchedLanePriority;+    return_updateRangeEnd = SyncBatchedUpdateRangeEnd;+    return SyncBatchedLane;+  }+  const inputDiscreteLanes = InputDiscreteLanes & lanes;+  if (inputDiscreteLanes !== NoLanes) {+    if (inputDiscreteLanes & InputDiscreteHydrationLane) {+      return_highestLanePriority = InputDiscreteHydrationLanePriority;+      return_updateRangeEnd = InputDiscreteUpdateRangeStart;+      return InputDiscreteHydrationLane;+    } else {+      return_highestLanePriority = InputDiscreteLanePriority;+      return_updateRangeEnd = InputDiscreteUpdateRangeEnd;+      return inputDiscreteLanes;+    }+  }+  const inputContinuousLanes = InputContinuousLanes & lanes;+  if (inputContinuousLanes !== NoLanes) {+    if (inputContinuousLanes & InputContinuousHydrationLane) {+      return_highestLanePriority = InputContinuousHydrationLanePriority;+      return_updateRangeEnd = InputContinuousUpdateRangeStart;+      return InputContinuousHydrationLane;+    } else {+      return_highestLanePriority = InputContinuousLanePriority;+      return_updateRangeEnd = InputContinuousUpdateRangeEnd;+      return inputContinuousLanes;+    }+  }+  const defaultLanes = DefaultLanes & lanes;+  if (defaultLanes !== NoLanes) {+    if (defaultLanes & DefaultHydrationLane) {+      return_highestLanePriority = DefaultHydrationLanePriority;+      return_updateRangeEnd = DefaultUpdateRangeStart;+      return DefaultHydrationLane;+    } else {+      return_highestLanePriority = DefaultLanePriority;+      return_updateRangeEnd = DefaultUpdateRangeEnd;+      return defaultLanes;+    }+  }+  const transitionShortLanes = TransitionShortLanes & lanes;+  if (transitionShortLanes !== NoLanes) {+    if (transitionShortLanes & TransitionShortHydrationLane) {+      return_highestLanePriority = TransitionShortHydrationLanePriority;+      return_updateRangeEnd = TransitionShortUpdateRangeStart;+      return TransitionShortHydrationLane;+    } else {+      return_highestLanePriority = TransitionShortLanePriority;+      return_updateRangeEnd = TransitionShortUpdateRangeEnd;+      return transitionShortLanes;+    }+  }+  const transitionLongLanes = TransitionLongLanes & lanes;+  if (transitionLongLanes !== NoLanes) {+    if (transitionLongLanes & TransitionLongHydrationLane) {+      return_highestLanePriority = TransitionLongHydrationLanePriority;+      return_updateRangeEnd = TransitionLongUpdateRangeStart;+      return TransitionLongHydrationLane;+    } else {+      return_highestLanePriority = TransitionLongLanePriority;+      return_updateRangeEnd = TransitionLongUpdateRangeEnd;+      return transitionLongLanes;+    }+  }+  if (lanes & SelectiveHydrationLane) {+    return_highestLanePriority = SelectiveHydrationLanePriority;+    return_updateRangeEnd = SelectiveHydrationRangeEnd;+    return SelectiveHydrationLane;+  }+  const idleLanes = IdleLanes & lanes;+  if (idleLanes !== NoLanes) {+    if (idleLanes & IdleHydrationLane) {+      return_highestLanePriority = IdleHydrationLanePriority;+      return_updateRangeEnd = IdleUpdateRangeStart;+      return IdleHydrationLane;+    } else {+      return_updateRangeEnd = IdleUpdateRangeEnd;+      return idleLanes;+    }+  }+  if ((OffscreenLane & lanes) !== NoLanes) {+    return_highestLanePriority = OffscreenLanePriority;+    return_updateRangeEnd = TotalLanes;+    return OffscreenLane;+  }+  if (__DEV__) {+    console.error('Should have found matching lanes. This is a bug in React.');+  }+  // This shouldn't be reachable, but as a fallback, return the entire bitmask.+  return_highestLanePriority = DefaultLanePriority;+  return_updateRangeEnd = DefaultUpdateRangeEnd;+  return lanes;+}++export function schedulerPriorityToLanePriority(+  schedulerPriorityLevel: ReactPriorityLevel,+): LanePriority {+  switch (schedulerPriorityLevel) {+    case ImmediateSchedulerPriority:+      return SyncLanePriority;+    case UserBlockingSchedulerPriority:+      return InputContinuousLanePriority;+    case NormalSchedulerPriority:+    case LowSchedulerPriority:+      // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.+      return DefaultLanePriority;+    case IdleSchedulerPriority:+      return IdleLanePriority;+    default:+      return NoLanePriority;+  }+}++export function lanePriorityToSchedulerPriority(+  lanePriority: LanePriority,+): ReactPriorityLevel {+  switch (lanePriority) {+    case SyncLanePriority:+    case SyncBatchedLanePriority:+      return ImmediateSchedulerPriority;+    case InputDiscreteHydrationLanePriority:+    case InputDiscreteLanePriority:+    case InputContinuousHydrationLanePriority:+    case InputContinuousLanePriority:+      return UserBlockingSchedulerPriority;+    case DefaultHydrationLanePriority:+    case DefaultLanePriority:+    case TransitionShortHydrationLanePriority:+    case TransitionShortLanePriority:+    case TransitionLongHydrationLanePriority:+    case TransitionLongLanePriority:+    case SelectiveHydrationLanePriority:+      return NormalSchedulerPriority;+    case IdleHydrationLanePriority:+    case IdleLanePriority:+    case OffscreenLanePriority:+      return IdleSchedulerPriority;+    case NoLanePriority:+      return NoSchedulerPriority;+    default:+      invariant(+        false,+        'Invalid update priority: %s. This is a bug in React.',+        lanePriority,+      );+  }+}++export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {+  // Early bailout if there's no pending work left.+  const pendingLanes = root.pendingLanes;+  if (pendingLanes === NoLanes) {+    return_highestLanePriority = NoLanePriority;+    return NoLanes;+  }++  let nextLanes = NoLanes;+  let nextLanePriority = NoLanePriority;+  let equalOrHigherPriorityLanes = NoLanes;++  const expiredLanes = root.expiredLanes;+  const suspendedLanes = root.suspendedLanes;+  const pingedLanes = root.pingedLanes;++  // Check if any work has expired.+  if (expiredLanes !== NoLanes) {+    nextLanes = expiredLanes;+    nextLanePriority = return_highestLanePriority = SyncLanePriority;+    equalOrHigherPriorityLanes = (getLowestPriorityLane(nextLanes) << 1) - 1;+  } else {+    // Do not work on any idle work until all the non-idle work has finished,+    // even if the work is suspended.+    const nonIdlePendingLanes = pendingLanes & NonIdleLanes;+    if (nonIdlePendingLanes !== NoLanes) {+      const nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;+      if (nonIdleUnblockedLanes !== NoLanes) {+        nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);+        nextLanePriority = return_highestLanePriority;+        equalOrHigherPriorityLanes = (1 << return_updateRangeEnd) - 1;+      } else {+        const nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;+        if (nonIdlePingedLanes !== NoLanes) {+          nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);+          nextLanePriority = return_highestLanePriority;+          equalOrHigherPriorityLanes = (1 << return_updateRangeEnd) - 1;+        }+      }+    } else {+      // The only remaining work is Idle.+      const unblockedLanes = pendingLanes & ~suspendedLanes;+      if (unblockedLanes !== NoLanes) {+        nextLanes = getHighestPriorityLanes(unblockedLanes);+        nextLanePriority = return_highestLanePriority;+        equalOrHigherPriorityLanes = (1 << return_updateRangeEnd) - 1;+      } else {+        if (pingedLanes !== NoLanes) {+          nextLanes = getHighestPriorityLanes(pingedLanes);+          nextLanePriority = return_highestLanePriority;+          equalOrHigherPriorityLanes = (1 << return_updateRangeEnd) - 1;+        }+      }+    }+  }++  if (nextLanes === NoLanes) {+    // This should only be reachable if we're suspended+    // TODO: Consider warning in this path if a fallback timer is not scheduled.+    return NoLanes;+  }++  // If there are higher priority lanes, we'll include them even if they+  // are suspended.+  nextLanes = pendingLanes & equalOrHigherPriorityLanes;++  // If we're already in the middle of a render, switching lanes will interrupt+  // it and we'll lose our progress. We should only do this if the new lanes are+  // higher priority.+  if (+    wipLanes !== NoLanes &&+    wipLanes !== nextLanes &&+    // If we already suspended with a delay, then interrupting is fine. Don't+    // bother waiting until the root is complete.+    (wipLanes & suspendedLanes) === NoLanes+  ) {+    getHighestPriorityLanes(wipLanes);

It's a 'get' function but we don't use the return value from it though that's intended, but is that will get confusing?

acdlite

comment created time in a month

startedstewdio/q.js

started time in a month

startedpeers/peerjs-server

started time in a month

Pull request review commentfacebook/react

Make ExpirationTime an opaque type

 import {   IdlePriority, } from './SchedulerWithReactIntegration.new'; -export type ExpirationTime = number;+export opaque type ExpirationTimeOpaque = number; -export const NoWork = 0;+export const NoWork: ExpirationTimeOpaque = 0; // TODO: Think of a better name for Never. The key difference with Idle is that // Never work can be committed in an inconsistent state without tearing the UI. // The main example is offscreen content, like a hidden subtree. So one possible // name is Offscreen. However, it also includes dehydrated Suspense boundaries, // which are inconsistent in the sense that they haven't finished yet, but // aren't visibly inconsistent because the server rendered HTML matches what the // hydrated tree would look like.-export const Never = 1;+export const Never: ExpirationTimeOpaque = 1; // Idle is slightly higher priority than Never. It must completely finish in // order to be consistent.-export const Idle = 2;+export const Idle: ExpirationTimeOpaque = 2; // Continuous Hydration is slightly higher than Idle and is used to increase // priority of hover targets.-export const ContinuousHydration = 3;-export const LongTransition = 49999;-export const ShortTransition = 99999;-export const Sync = MAX_SIGNED_31_BIT_INT;-export const Batched = Sync - 1;+export const ContinuousHydration: ExpirationTimeOpaque = 3;+export const LongTransition: ExpirationTimeOpaque = 49999;+export const ShortTransition: ExpirationTimeOpaque = 99999;+export const DefaultUpdateTime: ExpirationTimeOpaque = 1073741296;+export const UserBlockingUpdateTime: ExpirationTimeOpaque = 1073741761;+export const Sync: ExpirationTimeOpaque = MAX_SIGNED_31_BIT_INT;+export const Batched: ExpirationTimeOpaque = Sync - 1; -const UNIT_SIZE = 10;-const MAGIC_NUMBER_OFFSET = Batched - 1;--// 1 unit of expiration time represents 10ms.-export function msToExpirationTime(ms: number): ExpirationTime {-  // Always subtract from the offset so that we don't clash with the magic number for NoWork.-  return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);-}--export function expirationTimeToMs(expirationTime: ExpirationTime): number {-  return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;-}--function ceiling(num: number, precision: number): number {-  return (((num / precision) | 0) + 1) * precision;-}--function computeExpirationBucket(-  currentTime,-  expirationInMs,-  bucketSizeMs,-): ExpirationTime {-  return (-    MAGIC_NUMBER_OFFSET --    ceiling(-      MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE,-      bucketSizeMs / UNIT_SIZE,-    )-  );-}--// TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update-// the names to reflect.-export const LOW_PRIORITY_EXPIRATION = 5000;-export const LOW_PRIORITY_BATCH_SIZE = 250;--export function computeAsyncExpiration(-  currentTime: ExpirationTime,-): ExpirationTime {-  return computeExpirationBucket(-    currentTime,-    LOW_PRIORITY_EXPIRATION,-    LOW_PRIORITY_BATCH_SIZE,-  );-}--export function computeSuspenseTimeout(-  currentTime: ExpirationTime,-  timeoutMs: number,-): ExpirationTime {-  const currentTimeMs = expirationTimeToMs(currentTime);-  const deadlineMs = currentTimeMs + timeoutMs;-  return msToExpirationTime(deadlineMs);-}--// We intentionally set a higher expiration time for interactive updates in-// dev than in production.-//-// If the main thread is being blocked so long that you hit the expiration,-// it's a problem that could be solved with better scheduling.-//-// People will be more likely to notice this and fix it with the long-// expiration time in development.-//-// In production we opt for better UX at the risk of masking scheduling-// problems, by expiring fast.-export const HIGH_PRIORITY_EXPIRATION = __DEV__ ? 500 : 150;-export const HIGH_PRIORITY_BATCH_SIZE = 100;--export function computeInteractiveExpiration(currentTime: ExpirationTime) {-  return computeExpirationBucket(-    currentTime,-    HIGH_PRIORITY_EXPIRATION,-    HIGH_PRIORITY_BATCH_SIZE,-  );-}+// Accounts for -1 trick to bump updates into a different batch+const ADJUSTMENT_OFFSET = 5;  export function inferPriorityFromExpirationTime(-  currentTime: ExpirationTime,-  expirationTime: ExpirationTime,+  expirationTime: ExpirationTimeOpaque, ): ReactPriorityLevel {-  if (expirationTime === Sync) {+  if (expirationTime >= Batched - ADJUSTMENT_OFFSET) {     return ImmediatePriority;   }-  if (expirationTime === Never || expirationTime === Idle) {-    return IdlePriority;-  }-  const msUntil =-    expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);-  if (msUntil <= 0) {-    return ImmediatePriority;-  }-  if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= UserBlockingUpdateTime - ADJUSTMENT_OFFSET) {     return UserBlockingPriority;   }-  if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= LongTransition - ADJUSTMENT_OFFSET) {     return NormalPriority;   } -  // TODO: Handle LowPriority+  // TODO: Handle LowPriority. Maybe should give it NormalPriority since Idle is+  // very agressively deprioritized.    // Assume anything lower has idle priority   return IdlePriority; }++export function isSameOrHigherPriority(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a >= b;+}++export function isSameExpirationTime(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a === b;+}

Oh, I know, thansk to the Closure

acdlite

comment created time in a month

pull request commentfacebook/react

Make ExpirationTime an opaque type

"Each lane will have a priority associated with it", if so, could we use the term "taskQueue" of HTML eventloop spec? Seems that's what the quote means.

acdlite

comment created time in a month

startedfunkia/turbine

started time in a month

startedjohanley/covid-19-canada

started time in a month

startedareebbeigh/chato

started time in a month

startedfeross/simple-peer

started time in a month

startedlynckia/licode

started time in a month

startedwebrtc/samples

started time in a month

startedpeers/peerjs

started time in a month

Pull request review commentfacebook/react

Make ExpirationTime an opaque type

 import {   IdlePriority, } from './SchedulerWithReactIntegration.new'; -export type ExpirationTime = number;+export opaque type ExpirationTimeOpaque = number; -export const NoWork = 0;+export const NoWork: ExpirationTimeOpaque = 0; // TODO: Think of a better name for Never. The key difference with Idle is that // Never work can be committed in an inconsistent state without tearing the UI. // The main example is offscreen content, like a hidden subtree. So one possible // name is Offscreen. However, it also includes dehydrated Suspense boundaries, // which are inconsistent in the sense that they haven't finished yet, but // aren't visibly inconsistent because the server rendered HTML matches what the // hydrated tree would look like.-export const Never = 1;+export const Never: ExpirationTimeOpaque = 1; // Idle is slightly higher priority than Never. It must completely finish in // order to be consistent.-export const Idle = 2;+export const Idle: ExpirationTimeOpaque = 2; // Continuous Hydration is slightly higher than Idle and is used to increase // priority of hover targets.-export const ContinuousHydration = 3;-export const LongTransition = 49999;-export const ShortTransition = 99999;-export const Sync = MAX_SIGNED_31_BIT_INT;-export const Batched = Sync - 1;+export const ContinuousHydration: ExpirationTimeOpaque = 3;+export const LongTransition: ExpirationTimeOpaque = 49999;+export const ShortTransition: ExpirationTimeOpaque = 99999;+export const DefaultUpdateTime: ExpirationTimeOpaque = 1073741296;+export const UserBlockingUpdateTime: ExpirationTimeOpaque = 1073741761;+export const Sync: ExpirationTimeOpaque = MAX_SIGNED_31_BIT_INT;+export const Batched: ExpirationTimeOpaque = Sync - 1; -const UNIT_SIZE = 10;-const MAGIC_NUMBER_OFFSET = Batched - 1;--// 1 unit of expiration time represents 10ms.-export function msToExpirationTime(ms: number): ExpirationTime {-  // Always subtract from the offset so that we don't clash with the magic number for NoWork.-  return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);-}--export function expirationTimeToMs(expirationTime: ExpirationTime): number {-  return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;-}--function ceiling(num: number, precision: number): number {-  return (((num / precision) | 0) + 1) * precision;-}--function computeExpirationBucket(-  currentTime,-  expirationInMs,-  bucketSizeMs,-): ExpirationTime {-  return (-    MAGIC_NUMBER_OFFSET --    ceiling(-      MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE,-      bucketSizeMs / UNIT_SIZE,-    )-  );-}--// TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update-// the names to reflect.-export const LOW_PRIORITY_EXPIRATION = 5000;-export const LOW_PRIORITY_BATCH_SIZE = 250;--export function computeAsyncExpiration(-  currentTime: ExpirationTime,-): ExpirationTime {-  return computeExpirationBucket(-    currentTime,-    LOW_PRIORITY_EXPIRATION,-    LOW_PRIORITY_BATCH_SIZE,-  );-}--export function computeSuspenseTimeout(-  currentTime: ExpirationTime,-  timeoutMs: number,-): ExpirationTime {-  const currentTimeMs = expirationTimeToMs(currentTime);-  const deadlineMs = currentTimeMs + timeoutMs;-  return msToExpirationTime(deadlineMs);-}--// We intentionally set a higher expiration time for interactive updates in-// dev than in production.-//-// If the main thread is being blocked so long that you hit the expiration,-// it's a problem that could be solved with better scheduling.-//-// People will be more likely to notice this and fix it with the long-// expiration time in development.-//-// In production we opt for better UX at the risk of masking scheduling-// problems, by expiring fast.-export const HIGH_PRIORITY_EXPIRATION = __DEV__ ? 500 : 150;-export const HIGH_PRIORITY_BATCH_SIZE = 100;--export function computeInteractiveExpiration(currentTime: ExpirationTime) {-  return computeExpirationBucket(-    currentTime,-    HIGH_PRIORITY_EXPIRATION,-    HIGH_PRIORITY_BATCH_SIZE,-  );-}+// Accounts for -1 trick to bump updates into a different batch+const ADJUSTMENT_OFFSET = 5;  export function inferPriorityFromExpirationTime(-  currentTime: ExpirationTime,-  expirationTime: ExpirationTime,+  expirationTime: ExpirationTimeOpaque, ): ReactPriorityLevel {-  if (expirationTime === Sync) {+  if (expirationTime >= Batched - ADJUSTMENT_OFFSET) {     return ImmediatePriority;   }-  if (expirationTime === Never || expirationTime === Idle) {-    return IdlePriority;-  }-  const msUntil =-    expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);-  if (msUntil <= 0) {-    return ImmediatePriority;-  }-  if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= UserBlockingUpdateTime - ADJUSTMENT_OFFSET) {     return UserBlockingPriority;   }-  if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= LongTransition - ADJUSTMENT_OFFSET) {     return NormalPriority;   } -  // TODO: Handle LowPriority+  // TODO: Handle LowPriority. Maybe should give it NormalPriority since Idle is+  // very agressively deprioritized.    // Assume anything lower has idle priority   return IdlePriority; }++export function isSameOrHigherPriority(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a >= b;+}++export function isSameExpirationTime(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a === b;+}

Yea, I think you mean the Lanes, but just like bit masks in SideEffectTags or TypeOfMode, we don't use any helper, right? Back to the ponit, here I just means for the simple compare like isSameOrHigher or isSame, we can just use >= or ===, but for complex compare or other purpose like bumpPriorityHigher, we can use it as a helper

acdlite

comment created time in a month

Pull request review commentfacebook/react

Make ExpirationTime an opaque type

 import {   IdlePriority, } from './SchedulerWithReactIntegration.new'; -export type ExpirationTime = number;+export opaque type ExpirationTimeOpaque = number; -export const NoWork = 0;+export const NoWork: ExpirationTimeOpaque = 0; // TODO: Think of a better name for Never. The key difference with Idle is that // Never work can be committed in an inconsistent state without tearing the UI. // The main example is offscreen content, like a hidden subtree. So one possible // name is Offscreen. However, it also includes dehydrated Suspense boundaries, // which are inconsistent in the sense that they haven't finished yet, but // aren't visibly inconsistent because the server rendered HTML matches what the // hydrated tree would look like.-export const Never = 1;+export const Never: ExpirationTimeOpaque = 1; // Idle is slightly higher priority than Never. It must completely finish in // order to be consistent.-export const Idle = 2;+export const Idle: ExpirationTimeOpaque = 2; // Continuous Hydration is slightly higher than Idle and is used to increase // priority of hover targets.-export const ContinuousHydration = 3;-export const LongTransition = 49999;-export const ShortTransition = 99999;-export const Sync = MAX_SIGNED_31_BIT_INT;-export const Batched = Sync - 1;+export const ContinuousHydration: ExpirationTimeOpaque = 3;+export const LongTransition: ExpirationTimeOpaque = 49999;+export const ShortTransition: ExpirationTimeOpaque = 99999;+export const DefaultUpdateTime: ExpirationTimeOpaque = 1073741296;+export const UserBlockingUpdateTime: ExpirationTimeOpaque = 1073741761;+export const Sync: ExpirationTimeOpaque = MAX_SIGNED_31_BIT_INT;+export const Batched: ExpirationTimeOpaque = Sync - 1; -const UNIT_SIZE = 10;-const MAGIC_NUMBER_OFFSET = Batched - 1;--// 1 unit of expiration time represents 10ms.-export function msToExpirationTime(ms: number): ExpirationTime {-  // Always subtract from the offset so that we don't clash with the magic number for NoWork.-  return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);-}--export function expirationTimeToMs(expirationTime: ExpirationTime): number {-  return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;-}--function ceiling(num: number, precision: number): number {-  return (((num / precision) | 0) + 1) * precision;-}--function computeExpirationBucket(-  currentTime,-  expirationInMs,-  bucketSizeMs,-): ExpirationTime {-  return (-    MAGIC_NUMBER_OFFSET --    ceiling(-      MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE,-      bucketSizeMs / UNIT_SIZE,-    )-  );-}--// TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update-// the names to reflect.-export const LOW_PRIORITY_EXPIRATION = 5000;-export const LOW_PRIORITY_BATCH_SIZE = 250;--export function computeAsyncExpiration(-  currentTime: ExpirationTime,-): ExpirationTime {-  return computeExpirationBucket(-    currentTime,-    LOW_PRIORITY_EXPIRATION,-    LOW_PRIORITY_BATCH_SIZE,-  );-}--export function computeSuspenseTimeout(-  currentTime: ExpirationTime,-  timeoutMs: number,-): ExpirationTime {-  const currentTimeMs = expirationTimeToMs(currentTime);-  const deadlineMs = currentTimeMs + timeoutMs;-  return msToExpirationTime(deadlineMs);-}--// We intentionally set a higher expiration time for interactive updates in-// dev than in production.-//-// If the main thread is being blocked so long that you hit the expiration,-// it's a problem that could be solved with better scheduling.-//-// People will be more likely to notice this and fix it with the long-// expiration time in development.-//-// In production we opt for better UX at the risk of masking scheduling-// problems, by expiring fast.-export const HIGH_PRIORITY_EXPIRATION = __DEV__ ? 500 : 150;-export const HIGH_PRIORITY_BATCH_SIZE = 100;--export function computeInteractiveExpiration(currentTime: ExpirationTime) {-  return computeExpirationBucket(-    currentTime,-    HIGH_PRIORITY_EXPIRATION,-    HIGH_PRIORITY_BATCH_SIZE,-  );-}+// Accounts for -1 trick to bump updates into a different batch+const ADJUSTMENT_OFFSET = 5;  export function inferPriorityFromExpirationTime(-  currentTime: ExpirationTime,-  expirationTime: ExpirationTime,+  expirationTime: ExpirationTimeOpaque, ): ReactPriorityLevel {-  if (expirationTime === Sync) {+  if (expirationTime >= Batched - ADJUSTMENT_OFFSET) {     return ImmediatePriority;   }-  if (expirationTime === Never || expirationTime === Idle) {-    return IdlePriority;-  }-  const msUntil =-    expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);-  if (msUntil <= 0) {-    return ImmediatePriority;-  }-  if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= UserBlockingUpdateTime - ADJUSTMENT_OFFSET) {     return UserBlockingPriority;   }-  if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {+  if (expirationTime >= LongTransition - ADJUSTMENT_OFFSET) {     return NormalPriority;   } -  // TODO: Handle LowPriority+  // TODO: Handle LowPriority. Maybe should give it NormalPriority since Idle is+  // very agressively deprioritized.    // Assume anything lower has idle priority   return IdlePriority; }++export function isSameOrHigherPriority(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a >= b;+}++export function isSameExpirationTime(+  a: ExpirationTimeOpaque,+  b: ExpirationTimeOpaque,+) {+  return a === b;+}

Could I ask that what's the purpose of adding these two helper? Seems not good for code readable, I think maybe we can keep using >, <, ===?

acdlite

comment created time in a month

Pull request review commentfacebook/react

Initial Lanes implementation

  * @flow  */ -export opaque type LanePriority = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;--export const SyncLanePriority: LanePriority = 10;-export const SyncBatchedLanePriority: LanePriority = 9;-export const InputDiscreteLanePriority: LanePriority = 8;-export const InputContinuousLanePriority: LanePriority = 7;-export const DefaultLanePriority: LanePriority = 6;-export const TransitionShortLanePriority: LanePriority = 5;-export const TransitionLongLanePriority: LanePriority = 4;-export const HydrationContinuousLanePriority: LanePriority = 3;-export const IdleLanePriority: LanePriority = 2;-export const OffscreenLanePriority: LanePriority = 1;-export const NoLanePriority: LanePriority = 0;+import type {FiberRoot, ReactPriorityLevel} from './ReactInternalTypes';++export opaque type LanePriority =+  | 0+  | 1+  | 2+  | 3+  | 4+  | 5+  | 6+  | 7+  | 8+  | 9+  | 10+  | 11+  | 12+  | 13+  | 14+  | 15+  | 16;+export opaque type Lanes = number;+export opaque type Lane = number;++export opaque type LaneMap<T> = Array<T>;++import invariant from 'shared/invariant';++import {+  ImmediatePriority as ImmediateSchedulerPriority,+  UserBlockingPriority as UserBlockingSchedulerPriority,+  NormalPriority as NormalSchedulerPriority,+  LowPriority as LowSchedulerPriority,+  IdlePriority as IdleSchedulerPriority,+  NoPriority as NoSchedulerPriority,+} from './SchedulerWithReactIntegration.new';++export const SyncLanePriority: LanePriority = 16;+const SyncBatchedLanePriority: LanePriority = 15;++const InputDiscreteHydrationLanePriority: LanePriority = 14;+export const InputDiscreteLanePriority: LanePriority = 13;++const InputContinuousHydrationLanePriority: LanePriority = 12;+const InputContinuousLanePriority: LanePriority = 11;++const DefaultHydrationLanePriority: LanePriority = 10;+const DefaultLanePriority: LanePriority = 9;++const TransitionShortHydrationLanePriority: LanePriority = 8;+export const TransitionShortLanePriority: LanePriority = 7;++const TransitionLongHydrationLanePriority: LanePriority = 6;+export const TransitionLongLanePriority: LanePriority = 5;++const SelectiveHydrationLanePriority: LanePriority = 4;++const IdleHydrationLanePriority: LanePriority = 3;+const IdleLanePriority: LanePriority = 2;++const OffscreenLanePriority: LanePriority = 1;++const NoLanePriority: LanePriority = 0;++const TotalLanes = 30;++export const NoLanes: Lanes = /*                        */ 0b000000000000000000000000000000;+export const NoLane: Lane = /*                          */ 0b000000000000000000000000000000;++export const SyncLane: Lane = /*                        */ 0b000000000000000000000000000001;+const SyncUpdateRangeEnd = 1;+export const SyncBatchedLane: Lane = /*                 */ 0b000000000000000000000000000010;+const SyncBatchedUpdateRangeEnd = 2;++export const InputDiscreteHydrationLane: Lane = /*      */ 0b000000000000000000000000000100;+const InputDiscreteLanes: Lanes = /*                    */ 0b000000000000000000000000011100;+const InputDiscreteUpdateRangeStart = 3;+const InputDiscreteUpdateRangeEnd = 5;++const InputContinuousHydrationLane: Lane = /*           */ 0b000000000000000000000000100000;+const InputContinuousLanes: Lanes = /*                  */ 0b000000000000000000000011100000;+const InputContinuousUpdateRangeStart = 6;+const InputContinuousUpdateRangeEnd = 8;++export const DefaultHydrationLane: Lane = /*            */ 0b000000000000000000000100000000;+const DefaultLanes: Lanes = /*                          */ 0b000000000000000011111100000000;+const DefaultUpdateRangeStart = 9;+const DefaultUpdateRangeEnd = 14;++const TransitionShortHydrationLane: Lane = /*           */ 0b000000000000000100000000000000;+const TransitionShortLanes: Lanes = /*                  */ 0b000000000011111100000000000000;+const TransitionShortUpdateRangeStart = 15;+const TransitionShortUpdateRangeEnd = 20;++const TransitionLongHydrationLane: Lane = /*            */ 0b000000000100000000000000000000;+const TransitionLongLanes: Lanes = /*                   */ 0b000001111100000000000000000000;+const TransitionLongUpdateRangeStart = 21;+const TransitionLongUpdateRangeEnd = 25;++export const SelectiveHydrationLane: Lane = /*          */ 0b000010000000000000000000000000;+const SelectiveHydrationRangeEnd = 26;++// Includes all non-Idle updates+const UpdateRangeEnd = 26;+const NonIdleLanes = /*                                 */ 0b000011111111111111111111111111;++export const IdleHydrationLane: Lane = /*               */ 0b000100000000000000000000000000;+const IdleLanes: Lanes = /*                             */ 0b011100000000000000000000000000;+const IdleUpdateRangeStart = 27;+const IdleUpdateRangeEnd = 29;++export const OffscreenLane: Lane = /*                   */ 0b100000000000000000000000000000;

<MaybeOrNotOffscreen /> 😆

acdlite

comment created time in a month

startedthibautjombart/covid19_cases_from_deaths

started time in a month

startedctmarinas/stgit

started time in a month

push eventNE-SmallTown/my-understanding-of-react

Heaven

commit sha 92f094d86d22afa77407a693681d7725e2540225

fix typo: oncurrent - concurrent (#16633)

view details

Hristo Kanchev

commit sha 77bb1023986225a12aaa1b45b85703df5deaf95a

[DevTools] [Profiler]: Save profile now working in Firefox (#16612) * Added anchor dom element in order to successfully download profiling data. * Reworked downloadFile to accept a DOMElement in order for FF to successfully download profiling data. * Prettify downloadFile changes.

view details

Brian Vaughn

commit sha f705e2bac7582b2114f381f14546ff6ca02436b9

Updated pending CHANGELOG for DevTools

view details

Dominic Gannaway

commit sha af032764a9f244633eb7ff1a3205d2ec6073b501

[react-events] Adds preventKeys support to Keyboard responder (#16642)

view details

Dominic Gannaway

commit sha 539640d89f327743f2872098ec8aad08ab3a4dfd

[react-events] Various core tweaks for event responder system (#16654)

view details

Dominic Gannaway

commit sha 7126a37bf4284a30377e08b2ef84f61b64fdb8cd

[react-events] Keyboard responder propagation handling (#16657)

view details

Dominic Gannaway

commit sha 9ff60ff16b289a9efce46e21fe223aec1638b5d6

[react-events] Fix Scope listener issue (#16658)

view details

Dominic Gannaway

commit sha c66edb9f8b6baba71df4c21908829f805e57c0b1

[react-events] Refactor getCurrentTarget to getResponderNode (#16660)

view details

Dominic Gannaway

commit sha e86146e714bb98e973404350069915bf2760a1bd

[react-events] Refine executeUserEventHandler (#16662)

view details

Nicolas Gallagher

commit sha 9ce8711d5a7c84e71587c75d2935966023ee6dbb

[react-events] Tap responder (#16628) This is a partial replacement for the 'Press' responder: 1. `useTap` is scoped to pointers (no keyboard support). Our current thinking is that "responders" should be limited to working with pointers, and that they can be combined with 'useKeyboard' in user-space. For example, we might create a 'usePress' hook in user-space that combines 'useTap' with 'useKeyboard' to react to both pointers and keyboard interactions. 2. `useTap` cancels the gesture once the pointer moves over an element that is not within the responder target's subtree. This differs from `usePress` (and React Native), where the gesture remains active after the pointer exits the target's subtree and is restarted once the pointer reenters. One of the drawbacks with the `usePress` behavior is that it requires repeatedly measuring DOM elements (which can cause jank) to perform hit region tests. `useTap` avoids doing this and relies on `document.elementFromPoint` only to support the TouchEvent fallbacks. 3. `useTap` calls `onTapUpdate` when the active gesture's state changes, `onTapEnd` when the gesture successfully completes. and `onTapCancel` when it fails. There is no `onTap` callback. `usePress` did not explicitly report back when the gesture failed, and product developers were confused about the difference between `onPress` and `onPressEnd`. 4. `useTap` explicitly separates the PointerEvent implementation from the MouseEvent/TouchEvent fallback. 5. `useTap` has better unit test coverage . All pointer types and the fallback environment are tested. The shape of the gesture state object is also defined and tested.

view details

Sebastian Markbåge

commit sha 8d7c733f1fdad55d0f10947931b378edc5e039ad

[Partial Hydration] Don't invoke listeners on parent of dehydrated event target (#16591) * Don't invoke listeners on parent of dehydrated event target * Move Suspense boundary check to getClosestInstanceFromNode Now getClosestInstanceFromNode can return either a host component, host text component or suspense component when the suspense component is dehydrated. We then use that to ignore events on a suspense component. * Attach the HostRoot fiber to the DOM container This lets us detect if an event happens on this root's subtree before it has rendered something. * Add todo The approach of checking isFiberMounted answers if we might be in an in-progress hydration but it doesn't answer which root or boundary might be in-progress so we don't know what to wait for. This needs some refactoring. * Refactor isFiberMountedImpl to getNearestMountedFiber We'll need the nearest boundary for event replaying so this prepares for that. This surfaced an issue that we attach Hydrating tag on the root but normally this (and Placement) is attached on the child. This surfaced an issue that this can lead to both Placement and Hydrating effects which is not supported so we need to ensure that we only ever use one or the other. * Add todo for bug I spotted * Cache tags * Check the ContainerInstanceKey before the InstanceKey The container is inside the instance, so we must find it before the instance, since otherwise we'll miss it.

view details

Luna Ruan

commit sha 79e46b67784623f42186f69baa233e5854a8408f

updated flags from false to dicated on www (#16647)

view details

Brian Vaughn

commit sha d96f478f8a79da3125f6842c16efbc2ae8bcd3bf

use-subscription tearing fix (#16623) * Add (failing) subscription tearing test and bugfix * Added more inline comments to test * Simplified tearing test case slightly

view details

Dan Abramov

commit sha 040ca0fad7296fcc1fb9a01ebdb169fb32e1bc32

Enable MessageLoop implementation by default (#16408)

view details

Nicolas Gallagher

commit sha ff006451ad792ed26793691402bf7b5f813205f7

[react-events] Fix isTargetWithinNode type (#16671) isTargetWithinNode passes the childTarget to getClosestInstanceFromNode which does not account for a null value of 'node'.

view details

Dan Abramov

commit sha 962dfc2c33710b880d90ba8db4f531040077d48e

Remove experimental scheduler flags (#16672)

view details

Sebastian Markbåge

commit sha e11bf42ceac5bb5ef0d7c98d0d075048c94352dd

Check for Suspense boundary in a root Container (#16673) If we find a Container that might mean that we're on a node that is inside a Suspense boundary that is directly inside the Container root. Imagine the div is a Container and the span is a dehydrated instance: ``` <div> <!--$--> <span /> <!--/$--> </div> ``` There's no way to tests this yet since I'm not actually utilizing the return value yet. The solution is to just use the same path to check for a Suspense boundary as if we find a parent instance.

view details

Heaven

commit sha 61836fba2a5446c25aa223d2a8b3939cc90c6d03

Fix typo: wnless -> unless (#16680)

view details

Alex Rohleder

commit sha 206d61f72214e8ae5b935f0bf8628491cb7f0797

fix typos on react-devtools comments (#16681)

view details

Dan Abramov

commit sha 21d79ce04066ade1098a7ae8990e596e01332a65

Add FreshRuntime WWW bundle, remove ESLint (#16684)

view details

push time in a month

push eventNE-SmallTown/my-understanding-of-react

NE-SmallTown

commit sha 7c8506a67f88c8f476f78f27a2cd632a46f383d5

update comment

view details

NE-SmallTown

commit sha 1e479696f0223806990282a1202f288b8d44bcbd

clear2

view details

push time in a month

push eventNE-SmallTown/my-understanding-of-react

wangliangjing7478

commit sha 00893685bb34d8f2302a3be31c5eaeada1366345

clear

view details

push time in a month

push eventNE-SmallTown/my-understanding-of-react

wangliangjing7478

commit sha 667b598c5e4b38b2aad9d40d13161a91cd710c42

clear

view details

push time in a month

startedgre/bezier-easing

started time in a month

startedjarrywangcn/wuhan2020-timeline

started time in a month

startedinvishantom/nCovMemory

started time in a month

startedlestweforget/COVID-19-Timeline

started time in a month

CommitCommentEvent
CommitCommentEvent

startednecsi/covid19

started time in a month

startediikira/BaiduPCS-Go

started time in a month

startedWICG/main-thread-scheduling

started time in a month

more