profile
viewpoint
Nicolas Gallagher necolas Facebook San Francisco, CA http://nicolasgallagher.com Working on @reactjs for the web

necolas/css3-github-buttons 1121

Helps you easily create GitHub-style buttons and toolbars using links, buttons, and inputs.

necolas/dotfiles 713

OS X dotfiles: bash, git, vim, etc.

necolas/css3-facebook-buttons 580

Simple CSS to recreate the appearance of Facebook's buttons and toolbars.

necolas/css3-social-signin-buttons 470

CSS3 Social Sign-in Buttons with icons. Small and large sizes.

globalizejs/react-globalize 106

Bringing the i18n functionality of Globalize, backed by CLDR, to React

necolas/emitter.js 84

A simple JavaScript event-emitter

necolas/chrome-tab-limit 54

Chrome browser extension that limits you to 20 open tabs

necolas/delegate.js 43

DOM event delegation component

necolas/custom-tweet-button-for-wordpress 38

A fully customisable HTML and CSS Tweet Button for Wordpress. Built using PHP; no JavaScript requirement. Uses the bit.ly and Twitter APIs.

necolas/dom-shims 31

Complete and well-tested shims / polyfills for various DOM API's missing in not-so-modern browsers

pull request commentfacebook/react

[react-interactions] Ensure blur to window disengages press

Shouldn't this also be added to Tap / non-legacy Press? Those are the ones we would port in the future, so this detail should be incorporated imo

trueadm

comment created time in 2 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha 4d223c4ca2b3bd495a1600a2cb7c83c5c02e26c2

Deploy documentation

view details

push time in 3 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha e3f890f1d293b3416b56289febf1b7850de7ea19

Benchmarks deploy

view details

push time in 3 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha 5287044f403d881a13e17f140c5575ce0661587f

0.12.2

view details

push time in 3 days

created tagnecolas/react-native-web

tag0.12.2

React Native for Web

created time in 3 days

pull request commentnecolas/react-native-web

fix injectEventPluginsByName throwing when re-evaluating code

Thanks. Seems fine for now

vovaguguiev

comment created time in 3 days

push eventnecolas/react-native-web

Vladimir Guguiev

commit sha 92737d33f420720ca782c3aac6c5110db3186ae2

[fix] Prevent injectEventPluginsByName throwing when re-evaluating code Close #1539

view details

push time in 3 days

PR closed necolas/react-native-web

fix injectEventPluginsByName throwing when re-evaluating code

We (framer.com team) ran into this problem when investigating the errors thrown by the projects that were using react-native-web. Framer projects have the following setup:

  • The project code is bundled with webpack while declaring ReactDOM as an external that is provided by Framer X during the evaluation of the produced bundle
  • On every change to the user code, we re-bundle and re-evaluate the code but the instance of ReactDOM persists between those re-evaluations.
  • This makes injectEventPluginsByName throw the error: EventPluginRegistry: Cannot inject two different event plugins using the same name...

I'm happy to discuss alternative fixes is this one looks too hacky :)

+9 -3

0 comment

1 changed file

vovaguguiev

pr closed time in 3 days

push eventnecolas/react-native-web

editkid

commit sha 18427aae5082f521f2361c74a497ccf62500fad0

[fix] Avoid use of Object.values Improve compatibility with older browsers (without polyfilling) Close #1541

view details

push time in 3 days

PR closed necolas/react-native-web

Reviewers
Fix: Remove usages of Object.values, improve older browser compatibility

Hello. I found an old issue https://github.com/necolas/react-native-web/issues/1334 which had a fix applied but only partially it would appear. This PR simply applies the exact same fix in two other places in the same file.

Replace usages of Object.values to ensure compatibility with older browsers (without polyfilling). Ensures that IE10, IE11, Safari 8 etc. won't choke.

Hope this helps :v:

+4 -2

0 comment

1 changed file

editkid

pr closed time in 3 days

issue commentnecolas/react-native-web

Support <img loading="lazy" /> attribute

RN's Image is probably the API with the biggest differences from web images. Ultimately I suspect it will need to be redesigned significantly to better support web targets, e.g., Image shouldn't support any resizeMode types that cannot be implemented with object-fit and the ability to load images with HTTP headers also probably needs to be moved into a separate API from the rendering of images.

MoOx

comment created time in 3 days

issue commentreason-react-native/reason-react-native

allow `href` on Text for react-native-web

It will probably change in the future but not sure when. The problem with the current RN API is you can easily create interactive text that a web browser won't see as a URL and a user can't interact with as a link (e.g., <Text onPress={onPress} />). So making it intentionally difficult to create this kind of inaccessible pattern should be a design goal in the future

jfrolich

comment created time in 3 days

issue closednecolas/react-native-web

Native image-picking for web?

I just stumpled over this project and find my self confused about the power of react-native-web.

Will react-native-web add native image picking experience to my webapp (assuming the user uses the browser on a mobile device) or will it fallback to the usual web file picking?

Is there a better place to ask those questions?

closed time in 3 days

benpetsch

issue commentnecolas/react-native-web

Native image-picking for web?

RNW doesn't provide any APIs for image picking. You can use whatever is built into the browser, or the Expo APIs that wrap those browser APIs

benpetsch

comment created time in 3 days

push eventfacebook/react

Ryota Murakami

commit sha 48c4867d745bbf91ae73892545960c0979c2dbf7

Update issue templates to directly link to relevant sources (#18039) GitHub supports linking to off-site sources for certain types of issue.

view details

push time in 9 days

PR merged facebook/react

[ISSUE_TEMPLATE] Show Actual Link Buttom to ReactDocs/issues and stackoverflow CLA Signed

Summary

My secondary standing on the @necolas of Giants.(prev: playground react-native-web)

Now

Document and Question button jumping create issue page of facebook/react. Unfortunately, there are some people who doesn't follow our ISSUE_TEMPLATE message.

=====================================================================

Screen Shot 2020-02-14 at 19 09 28

After PR

Jumping directly to https://github.com/reactjs/reactjs.org/issues/new or https://stackoverflow.com/questions/tagged/reactjs?tab=Newest when user clicked Document or Question buttons.

=====================================================================

Screen Shot 2020-02-14 at 19 10 22

Test Plan

Putting exact same .github/ISSUE_TEMPLATE/config.yml file on my personal repository. Your can see look and behavior following link. https://github.com/ryota-murakami/react-garden/issues/new/choose

And this is official docs about .github/ISSUE_TEMPLATE/config.yml file. https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser

If you got something want to do in .github/ISSUE_TEMPLATE/config.yml from docs info, please feel free to modify that.

Thank you! 😀

+7 -42

4 comments

3 changed files

ryota-murakami

pr closed time in 9 days

Pull request review commentfacebook/react

[react-interactions] Ensure onBeforeBlur fires for hideInstance

 describe.each(table)('FocusWithin responder', hasPointerEvents => {         expect.objectContaining({isTargetAttached: false}),       );     });++    it.experimental(

These kinds of unit tests that involve the scheduler don't feel like they belong in the responders to me. Doesn't really matter right now since all this is going away eventually. But it makes me think about how we decide where the boundaries lie, as did your PR that rearranged the DOM event plugin system and its tests for the better

trueadm

comment created time in 9 days

Pull request review commentfacebook/react

[react-interactions] Ensure onBeforeBlur fires for hideInstance

 export function clearSuspenseBoundaryFromContainer(   retryIfBlockedOn(container); } +function instanceContainsElem(instance: Instance, element: HTMLElement) {+  let fiber = getClosestInstanceFromNode(element);+  while (fiber !== null) {+    if (fiber.tag === HostComponent && fiber.stateNode === element) {+      return true;+    }+    fiber = fiber.return;+  }+  return false;+}+ export function hideInstance(instance: Instance): void {+  // Ensure we trigger `onBeforeBlur` if the active focused elment+  // is ether the instance of a child of the instance. We need+  // to traverse the Fiber tree here rather than use node.contains()+  // as the child node might be inside a Portal.+  if (enableDeprecatedFlareAPI && selectionInformation) {+    const focusedElem = selectionInformation.focusedElem;+    if (focusedElem !== null && instanceContainsElem(instance, focusedElem)) {+      dispatchBeforeDetachedBlur(((focusedElem: any): HTMLElement));

Do we want to dispatch this event for the new event system too?

trueadm

comment created time in 9 days

Pull request review commentfacebook/react

[react-interactions] Ensure onBeforeBlur fires for hideInstance

 export function clearSuspenseBoundaryFromContainer(   retryIfBlockedOn(container); } +function instanceContainsElem(instance: Instance, element: HTMLElement) {+  let fiber = getClosestInstanceFromNode(element);+  while (fiber !== null) {+    if (fiber.tag === HostComponent && fiber.stateNode === element) {+      return true;+    }+    fiber = fiber.return;+  }+  return false;+}+ export function hideInstance(instance: Instance): void {+  // Ensure we trigger `onBeforeBlur` if the active focused elment+  // is ether the instance of a child of the instance. We need

s/of/or

trueadm

comment created time in 9 days

issue commentnecolas/react-native-web

The future of React Native for Web

Optimizing the existing hooks usage would be helpful at this point - any relevant use of useMemo, useCallback, etc.

necolas

comment created time in 13 days

issue openednecolas/react-native-web

The future of React Native for Web

Over the next few months I'll be working through some significant changes to React Native for Web. These changes will made on the next branch. The motivation for these changes is to:

  1. Update the library to use modern React features (e.g., Hooks) in preparation for Concurrent Mode.
  2. Move away from depending on ReactDOM's unstable-native-dependencies export, which we'd like to remove from ReactDOM.
  3. Resolve long-standing issues with the Responder Event Plugin.
  4. Prototype high-level gesture systems for ReactDOM.
  5. Simplify and improve the performance of the Touchable/Pressable components.

Hooks rewrite

Rewriting components to use Hooks is a prerequisite for all the other changes. This is already mostly complete at the time of writing. Using hooks simplifies the implementations of components and has already resolved a few bugs in the library related to using setNativeProps and TextInput events.

Over time I'd like to develop a collection of Hooks that are loosely coupled to React Native API so that I can prototype alternative component libraries designs, and other ideas we have for React such as separating the configuration of behavior from that of layout (see https://github.com/facebook/react/pull/17651). For example:

import usePress from './usePress';

function Button({children, onPress) {
  const ref = useRef(null);

  // behavior config
  usePress(ref, onPress);

  return (
    <View
      children={children}
      forwardedRef={ref}
    />
  );
}

Responder system rewrite

#1219 documents a variety of issues with using the Responder Event Plugin on the web. This plugin is used to implement the onResponderGrant, etc., callbacks but it requires modules that are not part of the stable release of ReactDOM. Furthermore, it doesn't integrate that well with the host (web) environment and is built on an event plugin architecture that we'd like to move away from in ReactDOM at some point in the future. Injecting the plugin for ReactDOM also has some undesired consequences for RNfW, including the addition of the "responder" event props to every ReactDOM host component (e.g., div).

I've been prototyping a user-space rewrite of the Responder system using Hooks. This would allow RNfW to remove the dependency on react-dom/unstable-native-dependencies. The replacement Hook can be used within the implementations of View and Text without polluting the ReactDOM system.

function View(props) {
  const { listeners } = useResponderEvents({
    onResponderGrant: props.onResponderGrant,
    ...
  });
  return (
    <div {...listeners} />
  );
}

It works well for single-pointer interactions and fixes most of the bugs in #1219. It's TBD how well this will scale to multi-pointer interactions. We may not be able to exactly reproduce the behaviour of the REP (e.g., order of events vs those coming from SimpleEventPlugin) but this probably isn't essential. This approach makes it possible to resolve most if not all of the REP-related bugs in RNW. Developing this Hook will also function as practical R&D for future event-related APIs in ReactDOM.

The Responder Event Plugin relies on listening to a handful of events at the top level, which is not something that ReactDOM supports outside of the Plugin system. Therefore, this replacement will need to bypass React and attach native event listeners. This isn't ideal for Concurrent Mode, but could be a surface for testing the experimental event system replacement @trueadm has been working on for ReactDOM.

Touchables rewrite

Further work could involve developing a hook-based replacement for Touchable that avoids the performance problems of the current design (which requires measuring view layout during user events), and reuses the work we've already done at Facebook to develop tap, keyboard, focus, and hover hooks.

The Touchable components will eventually be deprecated and removed from React Native in favor of a new Pressable component. Most of the logic for Pressability is already in React Native. However, while prototyping gestures on the web at Facebook we confirmed that there is a significant performance cost to the rect measurements that React Native performs in the Touchable and Pressability state machines. So a future version of Pressable for web will drop some of this complexity and claw back both runtime performance and bytes.

Canary releases

I will probably publish canary releases at various points in time. However, if you're using RNfW (e.g., Twitter, Expo, etc.) you could also create your own builds from the next branch and run your own tests to help surface any regressions that occur during development. There are already breaking changes in next that may cause unstable/undocumented props to not longer show up in the DOM, but behavior and layout shouldn't be affected and that's the main thing to look out for.

created time in 13 days

Pull request review commentfacebook/react

[ISSUE_TEMPLATE] Show Actual Link Buttom to ReactDocs/issues and stackoverflow

+contact_links:+    - name: 📃 Documentation Issue+      url: https://github.com/reactjs/reactjs.org/issues/new+      about: This issue tracker is not for documentation issues. Please file documentation issues here.+    - name: 🤔 Questions and Help+      url: https://stackoverflow.com/questions/tagged/react+      about: This issue tracker is not for questions. Please ask questions here.

Let's change this to:

This issue tracker is not for support questions. Please refer to the React community's help and discussion forums.

ryota-murakami

comment created time in 13 days

Pull request review commentfacebook/react

[ISSUE_TEMPLATE] Show Actual Link Buttom to ReactDocs/issues and stackoverflow

+contact_links:+    - name: 📃 Documentation Issue+      url: https://github.com/reactjs/reactjs.org/issues/new+      about: This issue tracker is not for documentation issues. Please file documentation issues here.+    - name: 🤔 Questions and Help+      url: https://stackoverflow.com/questions/tagged/react

Let's change this URL to:

https://reactjs.org/community/support.html

ryota-murakami

comment created time in 13 days

create barnchnecolas/react-native-web

branch : next

created branch time in 14 days

delete branch necolas/react-native-web

delete branch : next

delete time in 14 days

issue closednecolas/react-native-web

Can't resolve 'react-native-web/dist/exports/ViewPropTypes' after upgrading to 0.12.1

I have tried to upgrade from react-native-web v0.11.7 to 0.12.1 and it breaks my app:

 Module not found: Can't resolve 'react-native-web/dist/exports/ViewPropTypes' in '/home/dka/workspace/test-native/node_modules/react-native-swipe-list-view/components'

See:

https://github.com/jemise111/react-native-swipe-list-view/blob/6f22515c1d404d51bf8a6d1591ec51d241b77b9b/components/SwipeRow.js#L11

Related to:

  • https://github.com/jemise111/react-native-swipe-list-view/issues/412

closed time in 16 days

kopax

issue commentnecolas/react-native-web

Can't resolve 'react-native-web/dist/exports/ViewPropTypes' after upgrading to 0.12.1

It was removed as mentioned in the release notes https://github.com/necolas/react-native-web/releases/tag/0.12.0

kopax

comment created time in 16 days

pull request commentnecolas/react-native-web

fix: support image source objects

The conflicts are because the docs were rewritten. And now there is also a7ab961d95de892e4b41c96ea945aa344fd49e50

jaulz

comment created time in 17 days

push eventnecolas/react-native-web

Evan Bacon

commit sha a7ab961d95de892e4b41c96ea945aa344fd49e50

[fix] Image support for variable resolution images Renders the asset scale which is closest to the window scale. Requires bundler integration. Close #1456 Co-authored-by: David Calhoun <dpcalhoun@gmail.com>

view details

push time in 17 days

PR closed necolas/react-native-web

Multi resolution images

Continue the progress within #1408, by adding the requested unit test. @necolas please let me know if there is additional coverage you would like or a different testing approach you would prefer.

Closes #1408.

+29 -1

3 comments

2 changed files

dcalhoun

pr closed time in 17 days

PR closed necolas/react-native-web

Update Storybook link in README

Updates/fixes broken Storybook integration link in README

+1 -1

1 comment

1 changed file

jesperjohansson

pr closed time in 17 days

pull request commentnecolas/react-native-web

Update Storybook link in README

this was fixed by 3d53273fe757452250032286107fbfd495259a0c

jesperjohansson

comment created time in 17 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha e8f9738cf62b91b6af9d07448a202084adc1ad5d

Deploy documentation

view details

push time in 21 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha ff0c168ccdbf0ae5027197ab52ff383efd499853

Benchmarks deploy

view details

push time in 21 days

created tagnecolas/react-native-web

tag0.12.1

React Native for Web

created time in 21 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha 3d53273fe757452250032286107fbfd495259a0c

Update internal paths to docs

view details

Nicolas Gallagher

commit sha c8b73fa4e475bb7b6a79bdd4cfb20f357cc763d9

0.12.1

view details

push time in 21 days

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha d30d65b29df56dfd057e1ffeef7eb166772938ed

Update babel dependencies

view details

Nicolas Gallagher

commit sha 032279e5f7ac5fdec9bae3562953760044478227

Update dependencies for 'docs' package

view details

Nicolas Gallagher

commit sha dff62b3af6e4bade2e3cf3f4b2981bb2b4107c81

Update jest dependencies

view details

Nicolas Gallagher

commit sha 88c664fa0ff32e01c3f3df5df7116e435d57c335

Update dependencies for 'benchmarks' package

view details

Nicolas Gallagher

commit sha 5b7f584f191d8fb6e5c92fa560c4e6babca7559f

[fix] View filtering of accessibility props

view details

push time in 21 days

issue closednecolas/react-native-web

Upgrade from 0.11.7 to 0.12.0 fail to import AsyncStorage

The problem <!-- REQUIRED: A clear and concise description of the bug or problem. -->

I have tried to upgrade from react-native-web@0.11.7 to react-native-web@0.12.0

This is the error I have when starting my application after the upgrade:

Module not found: Can't resolve 'react-native-web/dist/exports/AsyncStorage' in '/home/dka/test-native/node_modules/expo/build/Notifications'

How to reproduce

Steps to reproduce:

  1. Use AsyncStorage and try to upgrade from 0.11.7 to 0.12.0

Expected behavior

It should work

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz
  • React (version): 16.12.0
  • Browser: Google Chrome

closed time in 21 days

kopax

issue commentnecolas/react-native-web

Upgrade from 0.11.7 to 0.12.0 fail to import AsyncStorage

It was removed intentionally

https://github.com/necolas/react-native-web/releases/tag/0.12.0

It's now a community module

https://github.com/react-native-community/async-storage/issues/52

kopax

comment created time in 21 days

issue closednecolas/react-native-web

custom attributes of Button are not rendered

customer attributes of Button are not rendered in the DOM, but its fine for View or Image. I added a data-id attribute to the Button, but I can't see in the inspect window.

Thanks

closed time in 22 days

chiru007

issue commentnecolas/react-native-web

custom attributes of Button are not rendered

That component doesn't support passing data attributes

chiru007

comment created time in 22 days

issue closednecolas/react-native-web

How to import two separate react-native packages to one web page?

Is your feature request related to a problem? Please describe. I have and issue when importing two react-native modules to web page. Looks like second package is not know anything about first and fails to load with error:

Invariant Violation: EventPluginRegistry: Cannot inject two different event plugins using the same name, ResponderEventPlugin.

I couldn't find anything related to importing multiple RNW packages to one page in documentation or issues. Mb it's not how this package suppose to be used.

But I want to ask if anybody have idea how this can be done. How to tell second rect-native-web package not init if first is running.

Thank you.

closed time in 22 days

BohdanHulchack

issue commentnecolas/react-native-web

How to import two separate react-native packages to one web page?

You can't have more than one copy. This is true for React too.

BohdanHulchack

comment created time in 22 days

delete branch necolas/react-native-web

delete branch : remove-prop-types

delete time in 23 days

delete branch necolas/react-native-web

delete branch : update-babel-plugin-tester

delete time in 23 days

issue closednecolas/react-native-web

[Proposal][Remove] create-react-class is no longer used by RN

Is your feature request related to a problem? Please describe. As mentioned in PR #27861, RN is no longer using create-react-class

Describe a solution you'd like I propose that we eliminate the use of create-react-class

closed time in 23 days

ecreeth

issue commentnecolas/react-native-web

[Proposal][Remove] create-react-class is no longer used by RN

That will happen when I port the latest changes over

ecreeth

comment created time in 23 days

push eventfacebook/react

Nicolas Gallagher

commit sha 38cd75861f44a40e686a39403bff39bf16fd796d

Update google-closure-compiler (#17902)

view details

push time in a month

PR merged facebook/react

Update google-closure-compiler CLA Signed React Core Team

Summary

Updates the google-closure-compiler dependency

Test Plan

CI

+45 -39

6 comments

2 changed files

necolas

pr closed time in a month

pull request commentfacebook/react

Update google-closure-compiler

Passing now. The previous test failures were a subset of the same tests that failed during the jest upgrade.

necolas

comment created time in a month

push eventnecolas/react

Nicolas Gallagher

commit sha 81e30c7ff67d4c5d6e9b9f2bb3d9af44bd40c621

Remove unused modules from legacy event responders (#17907)

view details

Nicolas Gallagher

commit sha 6faf6f5eb1705eef39a1d762d6ee381930f36775

Update to flow 0.97 (#17892)

view details

Simen Bekkhus

commit sha cf0081263ced42ddebe0a0d868701890448bfd4b

Upgrade to jest 25 (#17896) The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.

view details

Brian Vaughn

commit sha e26682a9f3889439765942f1510f280466c3433a

Removed Root API callback params and added warnings (#17916)

view details

Dominic Gannaway

commit sha b7f217d40c6c8c973c86fabceeda238b38662171

[Concurrent Mode] Add missing event plugin priorities (#17914)

view details

Dan Abramov

commit sha 29a1559619a4f7b63cc2a824482e86e6e9886938

Add semver dependency explicitly to DevTools (#17919)

view details

Dan Abramov

commit sha a8fce06d3efd52834de0e63c72ee77c2b267b48c

Fix Jest diff call (#17921)

view details

Dan Abramov

commit sha 57333ca33a0619ff2334e4eb19139b4c7e9830f7

Show first component stack in context warning (#17922) * Update tests * Show first component stack in context warning Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>

view details

Dan Abramov

commit sha faabe22b4f5b5812dc756b437465a3c519f6d872

Use next tag for canary releases in the doc (#17923)

view details

Dan Abramov

commit sha 241c4467eef7c2a8858c96d5dfe4e8ef84c47bad

Add a note about expiring OTP codes

view details

Andrew Clark

commit sha 01974a867c543fca6ebe9f4e612dcc3bb8f80528

Bugfix: Expiring a partially completed tree (#17926) * Failing test: Expiring a partially completed tree We should not throw out a partially completed tree if it expires in the middle of rendering. We should finish the rest of the tree without yielding, then finish any remaining expired levels in a single batch. * Check if there's a partial tree before restarting If a partial render expires, we should stay in the concurrent path (performConcurrentWorkOnRoot); we'll stop yielding, but the rest of the behavior remains the same. We will only revert to the sync path (performSyncWorkOnRoot) when starting on a new level. This approach prevents partially completed concurrent work from being discarded. * New test: retry after error during expired render

view details

Dominic Gannaway

commit sha b2382a71503595288a63050d1c71ff0be6650d6f

Add ReactDOM.unstable_renderSubtreeIntoContainer warning flag (#17936)

view details

Dominic Gannaway

commit sha 1662035852519983955c8c3bdab72a0c60b1264b

Ensure createRoot warning parity with ReactDOM.render (#17937)

view details

Sebastian Markbåge

commit sha e98797f7b98c827fb691e519bc2c445977a0546c

Fix Event Replaying in Flare by Eagerly Adding Active Listeners (#17933) * Add test of Event Replaying using Flare * Fix Event Replaying in Flare by Eagerly Adding Active Listeners This effectively reverts part of https://github.com/facebook/react/pull/17513

view details

Brian Vaughn

commit sha d2ae77d0e41fc6cee22bf3f0c9bd9c3d8bcec58c

Remove root.unmount() callback from DevTools code (#17939)

view details

Andrew Clark

commit sha 9dbe1c54dff3b6a7f89bae9b19b4698e0bfbcb9a

Revert "Bugfix: Expiring a partially completed tree (#17926)" (#17941) This reverts commit 01974a867c543fca6ebe9f4e612dcc3bb8f80528. * Failing test: Expiring a partially completed tree We should not throw out a partially completed tree if it expires in the middle of rendering. We should finish the rest of the tree without yielding, then finish any remaining expired levels in a single batch. * Check if there's a partial tree before restarting If a partial render expires, we should stay in the concurrent path (performConcurrentWorkOnRoot); we'll stop yielding, but the rest of the behavior remains the same. We will only revert to the sync path (performSyncWorkOnRoot) when starting on a new level. This approach prevents partially completed concurrent work from being discarded. * New test: retry after error during expired render

view details

Brian Vaughn

commit sha 6ae2c33a759e8f44622795603c84da9a2ebddf43

StrictMode should call sCU twice in DEV (#17942)

view details

Nicolas Gallagher

commit sha 813493f77c308e68ad42453e7b10e8f89b159a3a

Update google-closure-compiler

view details

push time in a month

release necolas/react-native-web

0.12.0

released time in a month

push eventfacebook/react

Simen Bekkhus

commit sha cf0081263ced42ddebe0a0d868701890448bfd4b

Upgrade to jest 25 (#17896) The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.

view details

push time in a month

PR merged facebook/react

chore: upgrade to jest 25 CLA Signed

Summary

The changes to the test code relate to changes in JSDOM that come with Jest 25:

  • Several JSDOM workarounds are no longer needed.
  • Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers.
    • https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh
  • JSDOM no longer triggers default actions when dispatching click events.
    • https://codesandbox.io/s/beautiful-cdn-ugn8f
  • JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent.
  • JSDOM now supports passive events.
  • JSDOM has improved support for custom CSS properties.
    • But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.

Closes #17012

Test Plan

yarn test

+1131 -984

20 comments

17 changed files

SimenB

pr closed time in a month

PR closed facebook/react

chore: upgrade jsdom CLA Signed

Following up on #15778, this is needed before being able to upgrade to Jest 25, which will have some significant performance improvements. Some tests for style properties are failing though, and I have no idea if it's due to jsdom or the tests themselves. I have some hope you'll know what's up yourselves 🤞

I tried upgrading to the Jest 25 alpha btw, and it fails in the same way, so if it's an issue with jsdom itself, it has not been fixed for jsdom@15 and it'd be great to report it to them.

/cc @threepointone

+30 -43

7 comments

3 changed files

SimenB

pr closed time in a month

issue closednecolas/react-native-web

0.12 release candidates

I published 0.12.0-rc.1 which has all the changes that are likely to go into 0.12.0 unless issues are spotted. The possible exception being the issue left in the 0.12 milestone but I'll need to check a possible change in IE11 and then have people check their app layouts didn't break.

cc @EvanBacon @paularmstrong @comp615 @brunolemos

closed time in a month

necolas

issue commentnecolas/react-native-web

0.12 release candidates

Closed by 0.12.0 https://github.com/necolas/react-native-web/commit/dee418bb930fdeabfad8361a2fdc4247519638a9

necolas

comment created time in a month

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha 1c72bb953536faf00d8f7abf1f96559ed24297ab

Deploy documentation

view details

push time in a month

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha 96f0be8fc64bf1a1bb2680bdff0cca727c28e8ca

Benchmarks deploy

view details

push time in a month

created tagnecolas/react-native-web

tag0.12.0

React Native for Web

created time in a month

push eventnecolas/react-native-web

Nicolas Gallagher

commit sha dee418bb930fdeabfad8361a2fdc4247519638a9

0.12.0

view details

push time in a month

PR closed necolas/react-native-web

Switch: React Native compatibility

This PR makes the Switch properties compatible to React Native, especially the trackColor: https://facebook.github.io/react-native/docs/switch#trackcolor

Please let me know if I should change anything.

+75 -145

1 comment

6 changed files

jaulz

pr closed time in a month

pull request commentnecolas/react-native-web

Switch: React Native compatibility

Fixed by https://github.com/necolas/react-native-web/commit/aa8593ba9704d42f26c87303ac5a584856cbadaa

jaulz

comment created time in a month

delete branch necolas/react

delete branch : remove-unused-responders

delete time in a month

delete branch necolas/react

delete branch : update-misc-deps

delete time in a month

delete branch necolas/react

delete branch : update-deps

delete time in a month

delete branch necolas/react

delete branch : update-flow

delete time in a month

pull request commentfacebook/react

chore: upgrade to jest 25

If you could please rebase this on top of latest master, it looks good to me.

SimenB

comment created time in a month

Pull request review commentfacebook/react

chore: upgrade to jest 25

 describe('ReactDOMServerIntegration', () => {           <div             style={{               lineClamp: 10,-              WebkitLineClamp: 10,

Not sure why we have this. lineClamp isn't a valid CSS property...

SimenB

comment created time in a month

push eventfacebook/react

Nicolas Gallagher

commit sha 6faf6f5eb1705eef39a1d762d6ee381930f36775

Update to flow 0.97 (#17892)

view details

push time in a month

PR merged facebook/react

Update to flow 0.97 CLA Signed React Core Team

Summary

Updates to Flow 0.97.

Flow made some changes when refining mixed to a function. But I don't understand how to fix our types to avoid this error, so I used $FlowFixMe to suppress them instead. Open to suggestions.

Test Plan

yarn flow dom

+17 -9

3 comments

9 changed files

necolas

pr closed time in a month

push eventfacebook/react

Nicolas Gallagher

commit sha 81e30c7ff67d4c5d6e9b9f2bb3d9af44bd40c621

Remove unused modules from legacy event responders (#17907)

view details

push time in a month

PR merged facebook/react

Remove unused modules from legacy event responders CLA Signed React Core Team

Summary

Removes unused event modules implemented with the legacy responder system. These modules are not used internally and never tested in production environments.

Test Plan

yarn test

+0 -1353

3 comments

10 changed files

necolas

pr closed time in a month

pull request commentfacebook/react

chore: upgrade to jest 25

I updated the PR summary with the relevant context behind the changes

SimenB

comment created time in a month

pull request commentfacebook/react

chore: upgrade to jest 25

Yeah it's helpful if the context goes into the PR summary. We don't usually expect context to be found in a PR against another repo.

SimenB

comment created time in a month

push eventnecolas/react

Nicolas Gallagher

commit sha 9d09052d2f14a238285352f3156bbe034451bc7b

Update various monorepo dependencies (#17901)

view details

Nicolas Gallagher

commit sha aedb6f4a95d2a1a78d4e154e783c66660c855f53

Update google-closure-compiler

view details

push time in a month

pull request commentfacebook/react

[react-interactions] use dom-event-testing-library for Drag tests

I removed these modules in https://github.com/facebook/react/pull/17907

trueadm

comment created time in a month

push eventnecolas/react

Luna Ruan

commit sha 3b3decf87121dcc20bfc0820b7b35d2b028adaf2

add warning when owner and self are different for string refs (#17864) When owner and self are different for string refs, we can't easily convert them to callback refs. This PR adds a warning for string refs when owner and self are different to tell users to manually update these refs.

view details

Simen Bekkhus

commit sha 3c713d513195a53788b3f8bb4b70279d68b15bcc

chore: update to latest release of babel (#17897)

view details

Nicolas Gallagher

commit sha 9d09052d2f14a238285352f3156bbe034451bc7b

Update various monorepo dependencies (#17901)

view details

Nicolas Gallagher

commit sha 77f8a5ef23c41089d54de66f08a4c6d4e4e1cee4

Update to flow 0.97

view details

push time in a month

PR opened facebook/react

Reviewers
Remove unused modules from legacy event responders

Summary

Removes unused event modules implemented with the legacy responder system. These modules are not used internally and never tested in production environments.

Test Plan

yarn test

+0 -1353

0 comment

10 changed files

pr created time in a month

push eventfacebook/react

Nicolas Gallagher

commit sha 9d09052d2f14a238285352f3156bbe034451bc7b

Update various monorepo dependencies (#17901)

view details

push time in a month

PR merged facebook/react

Update various monorepo dependencies CLA Signed React Core Team

Summary

Updates various monorepo dependencies. Will update the closure compiler dependency separately.

Test Plan

yarn test

+622 -451

3 comments

2 changed files

necolas

pr closed time in a month

create barnchnecolas/react

branch : remove-unused-responders

created branch time in a month

push eventnecolas/react

Simen Bekkhus

commit sha 3c713d513195a53788b3f8bb4b70279d68b15bcc

chore: update to latest release of babel (#17897)

view details

Nicolas Gallagher

commit sha d68271f0f1276c0a96252e20d4c0d9ba9aa73242

Update google-closure-compiler

view details

push time in a month

pull request commentfacebook/react

Use CommonJS outside of src

https://github.com/facebook/react/pull/17896

gaearon

comment created time in a month

push eventnecolas/react

Simen Bekkhus

commit sha 3c713d513195a53788b3f8bb4b70279d68b15bcc

chore: update to latest release of babel (#17897)

view details

Nicolas Gallagher

commit sha e1ca4f61c1230a6e26895559cb958c1e25d65b39

Update misc dependencies with new patch releases

view details

Nicolas Gallagher

commit sha 5a3f593669925eed2d95ba1364b3d862c5430c38

Update more dependencies

view details

Nicolas Gallagher

commit sha 08caf557dc10985ea46a876fe586bfd77b523391

Revert webpack update

view details

push time in a month

Pull request review commentfacebook/react

chore: upgrade to jest 25

 describe('ChangeEventPlugin', () => {     input.checked = true;     // Under the hood, uncheck the box so that the click will "check" it again.     setUntrackedChecked.call(input, false);-    input.dispatchEvent(-      new MouseEvent('click', {bubbles: true, cancelable: true}),-    );+    input.click();

Why did these events need to be changed?

SimenB

comment created time in a month

Pull request review commentfacebook/react

chore: upgrade to jest 25

 describe('SelectEventPlugin', () => {       <input type="text" onMouseDown={function() {}} />,       container,     );-    node.focus();

Why was this removed?

SimenB

comment created time in a month

Pull request review commentfacebook/react

chore: upgrade to jest 25

 describe('ReactDOMInput', () => {       container,     ); -    if (disableInputAttributeSyncing) {-      expect(log).toEqual([-        'set attribute type',-        'set attribute min',-        'set attribute max',-        'set attribute step',-        'set property value',-      ]);-    } else {-      expect(log).toEqual([-        'set attribute type',-        'set attribute min',-        'set attribute max',-        'set attribute step',-        'set property value',-        'set attribute value',-        'set attribute checked',-      ]);-    }+    expect(log).toEqual([

Why was this changed?

SimenB

comment created time in a month

issue closednecolas/react-native-web

How to add Airbnb lint ?

Is your feature request related to a problem? Please describe. Code conventions for my team.

Describe a solution you'd like Add Airbnb lint to my project!

Describe alternatives you've considered Still using how it is ...

Additional context Would be nice to have Typescript too !

closed time in a month

RenanLopes77

issue commentnecolas/react-native-web

How to add Airbnb lint ?

You can use eslint and the Airbnb plugin

RenanLopes77

comment created time in a month

Pull request review commentfacebook/react

Update various monorepo dependencies

     "@babel/preset-flow": "^7.0.0",     "@babel/preset-react": "^7.0.0",     "@babel/traverse": "^7.0.0",-    "@mattiasbuelens/web-streams-polyfill": "0.1.0",-    "art": "^0.10.1",+    "@mattiasbuelens/web-streams-polyfill": "^0.3.2",

Are you saying you want me to revert this change?

necolas

comment created time in a month

PR closed facebook/react

Update misc dependencies with new patch releases CLA Signed React Core Team

Summary

Updates packages with new patch releases. The exception is art, which causes tests to fail when updated, due a change in art's logic determining canvas support.

Test Plan

yarn test

+101 -116

3 comments

2 changed files

necolas

pr closed time in a month

PR opened facebook/react

Update google-closure-compiler

Summary

Updates the google-closure-compiler dependency

Test Plan

CI

+45 -39

0 comment

2 changed files

pr created time in a month

push eventnecolas/react

Nicolas Gallagher

commit sha b01891237b34558a3f9e24fc9763bcb7fc03b6d1

Update google-closure-compiler

view details

push time in a month

create barnchnecolas/react

branch : update-closure-compiler

created branch time in a month

push eventnecolas/react

Nicolas Gallagher

commit sha 618b67f1dcd9ea0bcc71f4490bf860e5a95caf7c

Revert webpack update

view details

push time in a month

PR opened facebook/react

Update various monorepo dependencies

Summary

Updates various monorepo dependencies. Will update the closure compiler dependency separately.

Test Plan

yarn test

+663 -448

0 comment

2 changed files

pr created time in a month

push eventnecolas/react

Nicolas Gallagher

commit sha 323d3985152e5adaae5bb18be3a66a9a709910e0

Revert webpack update

view details

push time in a month

more