profile
viewpoint
Janic Duplessis janicduplessis @th3rdwave Montreal, Canada https://medium.com/@janicduplessis Software stuff / founder @th3rdwave, React Native Core Contributor

facebook/react-native-fbsdk 2790

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.

janicduplessis/ex-navigation 5

Route-centric navigation for React Native

janicduplessis/flow-to-typescript 4

Convert Flow-annotated files to TypeScript

janicduplessis/apollo-tooling 0

✏️ Tooling for development and production Apollo workflows

janicduplessis/autoform-reactive-froala 0

Reactive Froala wrapper for Autoform.

janicduplessis/aws-xray-sdk-node 0

The official AWS X-Ray SDK for Node.js.

janicduplessis/buck 0

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.

push eventjanicduplessis/mobile

Kyle Peatt

commit sha 92a94c5e6fec73f1851abf9b43a92502f0639d78

Merge pull request #10 from CovidShield/add-attribution Add CC attribution and inspiration

view details

Emily Bulger

commit sha 011c2bae8d25c6a67a88976031be72d8fdac1ca0

Add "ThankYou" sheet content Content for bottom sheet to be displayed one time, post-onboarding. Reassures user that exposure notifications are on, and tells them that COVID Shield will send a notification if it detects that they have possibly been exposed to COVID-19.

view details

Jordan Good

commit sha 576957d934ed9e515acfc359aa10d39e521c7756

Merge pull request #14 from CovidShield/thankyou_sheet_content Add "ThankYou" sheet content

view details

Janic Duplessis

commit sha 2875e7cd7eff173afb2e130e97b3188437217462

Use YellowBox.ignoreWarnings instead of completely disabling it

view details

push time in 15 hours

push eventjanicduplessis/mobile

Emily Bulger

commit sha f85fccb3e34997380ea748a347721ae99c6131f6

Add "ThankYou" sheet content Content for bottom sheet to be displayed one time, post-onboarding. Reassures user that exposure notifications are on, and tells them that COVID Shield will send a notification if it detects that they have possibly been exposed to COVID-19.

view details

Janic Duplessis

commit sha aa10bdca2f55181179f0fd75c64252e650571c23

Use YellowBox.ignoreWarnings instead of completely disabling it

view details

push time in 15 hours

PR opened CovidShield/mobile

Use YellowBox.ignoreWarnings instead of completely disabling it

Those were the 2 warnings I found that were not actionable.

+7 -3

0 comment

1 changed file

pr created time in 15 hours

create barnchjanicduplessis/mobile

branch : yb

created branch time in 15 hours

PR opened CovidShield/mobile

Only include Intl polyfill on Android

This will avoid including the Intl polyfill in the bundle on iOS. The polyfill is actually only needed when using Hermes on Android so it could be completely removed in case we decide to keep using JSC (#33).

Moved the polyfill to index.js since the file uses require it makes it easier to conditionally require the polyfill. Imports get hoisted so it would not be possible to make sure the intl polyfill code runs before any other code.

+12 -2

0 comment

2 changed files

pr created time in 15 hours

PR opened CovidShield/mobile

Enable hermes on Android

This significantly improves app size and startup time. See for more info: https://hermesengine.dev/.

Hermes is pretty compatible with the current ecosystem, the main incompatibility is with OTA update services like CodePush. The other problematic one is crash reporting, but Sentry has good support for it. The app currently does not include any of these functionalities so it should not be a problem.

+5 -2

0 comment

3 changed files

pr created time in 15 hours

create barnchjanicduplessis/mobile

branch : intl-fix

created branch time in 15 hours

create barnchjanicduplessis/mobile

branch : hermes

created branch time in 16 hours

issue closedth3rdwave/react-native-safe-area-context

Top inset wrong when using hidden StatusBar in IOS

When using <StatusBar hidden /> in IOS, top inset is 20 instead of 0. It corrects itself after device is rotated to landscape and back.

https://snack.expo.io/SkroOuDAS

Tested phones:

  • iPhone 7 IOS 13.3 (has bug)
  • iPhone X IOS 13.3 (does not have bug)
  • various Android devices (does not have bug)

closed time in 16 hours

tafkanator

issue closedth3rdwave/react-native-safe-area-context

Android: False change of the bottom inset.

Hello everyone. After updating to version 1.0.2, I noticed strange behavior on Android. After I open the keyboard, I get the bottom indent with the wrong value, then the correct one comes. Example:

{left: 0, bottom: 0, right: 0, top: 0}
{left: 0, bottom: 0, right: 0, top: 0}
{left: 0, bottom: 249.3333282470703, right: 0, top: 0}
{left: 0, bottom: 249.3333282470703, right: 0, top: 0}
{left: 0, bottom: 0, right: 0, top: 0}

Keyboard mode: android:windowSoftInputMode="adjustResize"

closed time in 16 hours

DenysZP

issue commentth3rdwave/react-native-safe-area-context

Violation: requireNativeComponent: "RNCSafeAreaView" was not found in the UIManager.

If using expo make sure to use version 0.7.

brunolemos

comment created time in 16 hours

issue commentsoftware-mansion/react-native-screens

Consider exposing Animated.Value with transition progress (for shared element transitions)

Could be possible to use this along with native animated. We could expose an animation progress event which could be connected to an animated value. Not sure if it could work with stock pop / push animations but with the custom fade one it seems possible (turns out good since it is probably the animation you want to use with shared elements).

Here's how it could look:

const progress = new Animated.Value(0);

<ScreenStack>
  <Screen onAnimationProgress={Animated.event([{nativeEvent: {progress}}], {useNativeDriver: true})} />
</ScreenStack>
Jarred-Sumner

comment created time in 16 hours

pull request commentsoftware-mansion/react-native-screens

[native-stack] Add transitionStart and transitionEnd events

@Hirbod I think it is different, It could be possible to expose an animation progress event for the custom animations, so the fade one right now. Not sure if it is possible with the default push / pop animations.

janicduplessis

comment created time in 16 hours

startedreact-native-community/async-storage

started time in 2 days

delete branch janicduplessis/mobile

delete branch : autofocus

delete time in 2 days

delete branch janicduplessis/mobile

delete branch : patch-1

delete time in 2 days

delete branch janicduplessis/mobile

delete branch : patch-2

delete time in 2 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha cf722a65fb72b49388b53858baf1c9b4a6579ad3

Fix keyboard done button

view details

push time in 2 days

PR opened CovidShield/mobile

Set default tint color on iOS

Sets the default tint color to link blue. This will be used instead of the apple blue which is the default.

Test plan

For example in the share sheet, see "Edit Actions..."

Before:

image

After:

image

+5 -2

0 comment

1 changed file

pr created time in 2 days

create barnchjanicduplessis/mobile

branch : tint

created branch time in 2 days

PR opened CovidShield/mobile

Autofocus code input

I think this improves UX since it is the only input on the screen. There is a lint rule agains the autoFocus prop but I think this is for react web. If there is a reason for not using autofocus here feel free to close this.

image

+5 -2

0 comment

3 changed files

pr created time in 2 days

create barnchjanicduplessis/mobile

branch : autofocus

created branch time in 2 days

PR opened CovidShield/mobile

Add item to show the test menu from RN dev menu

This is easier than clicking the icon and accessible from anywhere.

Do we still want to keep the action on the icon?

Test plan

Open RN dev menu -> Show Test Menu -> Test menu opens

image

+11 -1

0 comment

1 changed file

pr created time in 2 days

create barnchjanicduplessis/mobile

branch : dev-menu

created branch time in 2 days

PR opened CovidShield/mobile

Invalidate EnManager on app reload

This fixes a crash when reloading the app on iOS.

Test plan

Open dev menu -> reload -> no crash 🎉

+6 -0

0 comment

1 changed file

pr created time in 2 days

create barnchjanicduplessis/mobile

branch : invalidate

created branch time in 2 days

push eventjanicduplessis/mobile

Emily Bulger

commit sha 011c2bae8d25c6a67a88976031be72d8fdac1ca0

Add "ThankYou" sheet content Content for bottom sheet to be displayed one time, post-onboarding. Reassures user that exposure notifications are on, and tells them that COVID Shield will send a notification if it detects that they have possibly been exposed to COVID-19.

view details

Jordan Good

commit sha 576957d934ed9e515acfc359aa10d39e521c7756

Merge pull request #14 from CovidShield/thankyou_sheet_content Add "ThankYou" sheet content

view details

push time in 2 days

PR opened CovidShield/mobile

Persist navigation state in dev

This implements state persistence for navigation in development. This means doing a full reload will restore the navigation in the state it was before. Based on https://reactnavigation.org/docs/state-persistence.

Test plan

Open the language screen on do a full reload, lang screen reopens.

+81 -3

0 comment

2 changed files

pr created time in 2 days

push eventjanicduplessis/mobile

Kyle Peatt

commit sha ced8e5551fe24f4fde4cde78f04c22b97ffee024

Merge pull request #5 from CovidShield/design-assets Add design assets

view details

Kyle Peatt

commit sha f067881a091f64b7ded1075a3c7eb33806cb0a37

Add CC attribution and inspiration

view details

Kyle Peatt

commit sha 92a94c5e6fec73f1851abf9b43a92502f0639d78

Merge pull request #10 from CovidShield/add-attribution Add CC attribution and inspiration

view details

Janic Duplessis

commit sha 4dae8b069853ac0303be37f78da3e1c497da1848

Persist navigation state in dev

view details

push time in 2 days

push eventjanicduplessis/mobile

Kyle Peatt

commit sha 5e452c78f7f23363c145ba3d25021efc62313e50

Add CC attribution and inspiration

view details

Janic Duplessis

commit sha 27dc70960e829fe5a969e8f44eced22003dadeea

Persist navigation state in dev

view details

push time in 2 days

create barnchjanicduplessis/mobile

branch : nav-state

created branch time in 2 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha 63d0f1fcb183db3fdbd86c2264e953cda8cb1b4a

Properly handle statusbar style with modals

view details

push time in 2 days

Pull request review commentCovidShield/mobile

Use react-navigation native stack

     "react-native-material-ripple": "^0.9.1",     "react-native-permissions": "^2.1.4",     "react-native-reanimated": "^1.8.0",-    "react-native-safe-area-context": "^0.7.3",+    "react-native-safe-area-context": "^2.0.0",

Updating this fixes SafeAreaView when inside a modal on iOS.

janicduplessis

comment created time in 2 days

PR opened CovidShield/mobile

Use react-navigation native stack

Motivation

Native stack uses native UIViewController and Fragment to handle screen transitions. It has the same api as react-navigation stack, just slightly different config options. This also enables react-native-screens which helps with performance by doing things like unmounting views that are not focused. See https://github.com/software-mansion/react-native-screens/tree/master/native-stack.

We also get the new iOS 13 modal design.

Test plan

Test modal screens manually

iOS

New modal design

image

Android

No changes

Screenshot_1590190167

+22 -12

0 comment

5 changed files

pr created time in 2 days

push eventjanicduplessis/mobile

Kyle Peatt

commit sha ced8e5551fe24f4fde4cde78f04c22b97ffee024

Merge pull request #5 from CovidShield/design-assets Add design assets

view details

Kyle Peatt

commit sha f067881a091f64b7ded1075a3c7eb33806cb0a37

Add CC attribution and inspiration

view details

Kyle Peatt

commit sha 92a94c5e6fec73f1851abf9b43a92502f0639d78

Merge pull request #10 from CovidShield/add-attribution Add CC attribution and inspiration

view details

Janic Duplessis

commit sha 1a2bc5a5c9864527e2b5de8fb85cf10dd4f931f4

Use react-navigation native stack

view details

push time in 2 days

push eventjanicduplessis/mobile

Kyle Peatt

commit sha b1934665977c5f15f588b096993bf1e8c60a7a6e

Add CC attribution and inspiration

view details

Janic Duplessis

commit sha 1b3c9357decc0df3a748353353863b1d0904e238

Use react-navigation native stack

view details

push time in 2 days

create barnchjanicduplessis/mobile

branch : native-stack

created branch time in 2 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha 5211868f19ba34a35d53314ae136f84613daa3f3

Vendor `getReactContext` to support RN 0.62-

view details

Janic Duplessis

commit sha 3b94beea1ebd8233ecbb526b1cfccdaf5091bca3

2.0.0

view details

push time in 3 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha 6b86062bb1de83aa67e90b1521a7af22ad0864be

Vendor `getReactContext` to support RN 0.62-

view details

push time in 3 days

created tagth3rdwave/react-native-safe-area-context

tagv2.0.0

A flexible way to handle safe area insets in JS. Also works on Android and Web!

created time in 3 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha f12ebef47e034c956e37a06a0111215366b4e531

2.0.0

view details

push time in 3 days

issue commentth3rdwave/react-native-safe-area-context

Android: False change of the bottom inset.

Can you test 2.0.0-beta.1 it should fix the issue.

DenysZP

comment created time in 3 days

created tagth3rdwave/react-native-safe-area-context

tagv2.0.0-beta.1

A flexible way to handle safe area insets in JS. Also works on Android and Web!

created time in 3 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha ac39399b5edc2db698bfcce4eebe09a4acf37968

2.0.0-beta.1

view details

push time in 3 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha 67c8a39fe75e67a26cb26f8491ee026c00e0371d

Fix bottom insets being affected by the keyboard on Android

view details

push time in 3 days

issue commentth3rdwave/react-native-safe-area-context

Android: False change of the bottom inset.

Ok I figured out what the issue is, will release a fix soon. Thanks for reporting this!

DenysZP

comment created time in 3 days

PR opened CovidShield/mobile

Fix missing Generated.xcconfig file error on initial build

On the first build this file does not exist since it is generated in the script phases later.

This is what is recommended in the react-native-config docs https://www.npmjs.com/package/react-native-config#availability-in-build-settings-and-infoplist

+2 -2

0 comment

2 changed files

pr created time in 3 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha 78dba811f5ae669e0ffa09363505bf15a072f013

Update Config.release.xcconfig

view details

push time in 3 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha 5aebde0bd195edef5fd96f716ca730c231281ff1

Fix missing Generated.xcconfig file error on initial build

view details

push time in 3 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha a0b83dc44cbef14db3917520a2a6c810a614674c

Update README.md

view details

push time in 3 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha 30a3d07f571412193ac3dcf315abb36fd35e7920

Update README.md

view details

push time in 3 days

PR opened CovidShield/mobile

Update install instructions to use bundler and yarn pod-install script

This should be the proper way to install pods to avoid issues with different versions.

+2 -1

0 comment

1 changed file

pr created time in 3 days

push eventjanicduplessis/mobile

Janic Duplessis

commit sha d30fcf38ff9c23e728c5898ca2dfe2db4cb0a1b1

Update install instructions to use bundler and yarn pod-install script

view details

push time in 3 days

fork janicduplessis/mobile

React Native client application for COVID Shield on iOS and Android

https://covidshield.app

fork in 3 days

startedCovidShield/mobile

started time in 3 days

push eventth3rdwave/react-native-safe-area-context

Ville Immonen

commit sha 93568d07f44e13302874710869f6d371c7f7bc47

Docs: linking in RN 0.60 is automatic (#80)

view details

push time in 3 days

PR merged th3rdwave/react-native-safe-area-context

Docs: linking in RN 0.60 is automatic

Summary

Linking with react-native link is no longer necessary in RN >= 0.60.

Screen Shot 2020-05-22 at 17 16 06

+13 -1

1 comment

1 changed file

fson

pr closed time in 3 days

pull request commentth3rdwave/react-native-safe-area-context

Docs: linking in RN 0.60 is automatic

Thanks!!

fson

comment created time in 3 days

Pull request review commentstyled-components/styled-components

Update StyledNativeComponent to hooks

 // @flow-import React, { createElement, Component } from 'react'; import hoist from 'hoist-non-react-statics';-import merge from '../utils/mixinDeep';+import React, {+  createElement,+  useContext,+  useDebugValue,+  type AbstractComponent,+  type Ref,+} from 'react';+import type { Attrs, RuleSet, Target } from '../types'; import determineTheme from '../utils/determineTheme'; import { EMPTY_ARRAY, EMPTY_OBJECT } from '../utils/empties';+import generateComponentId from '../utils/generateComponentId'; import generateDisplayName from '../utils/generateDisplayName';+import getComponentName from '../utils/getComponentName'; import isFunction from '../utils/isFunction';-import isTag from '../utils/isTag'; import isStyledComponent from '../utils/isStyledComponent';-import { ThemeConsumer } from './ThemeProvider';+import isTag from '../utils/isTag';+import merge from '../utils/mixinDeep';+import { ThemeContext } from './ThemeProvider'; -import type { Theme } from './ThemeProvider';-import type { Attrs, RuleSet, Target } from '../types';+const identifiers = {}; -// NOTE: no hooks available for react-native yet;-// if the user makes use of ThemeProvider or StyleSheetManager things will break.+/* We depend on components having unique IDs */+function generateId(displayName: string, parentComponentId: string) {+  const name = typeof displayName !== 'string' ? 'sc' : escape(displayName);+  // Ensure that no displayName can lead to duplicate componentIds+  identifiers[name] = (identifiers[name] || 0) + 1; -// Validator defaults to true if not in HTML/DOM env-const validAttr = () => true;+  const componentId = `${name}-${generateComponentId(name + identifiers[name])}`;+  return parentComponentId ? `${parentComponentId}-${componentId}` : componentId;+} -class StyledNativeComponent extends Component<*, *> {-  root: ?Object;--  attrs = {};--  render() {-    return (-      <ThemeConsumer>-        {(theme?: Theme) => {-          const {-            $as: transientAsProp,-            as: renderAs,-            forwardedComponent,-            forwardedAs,-            forwardedRef,-            style = [],-            ...props-          } = this.props;--          const { defaultProps, target, shouldForwardProp } = forwardedComponent;-          const elementToBeRendered =-            this.attrs.$as || this.attrs.as || transientAsProp || renderAs || target;--          const generatedStyles = this.generateAndInjectStyles(-            determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT,-            this.props-          );--          const isTargetTag = isTag(elementToBeRendered);-          const computedProps = this.attrs !== props ? { ...props, ...this.attrs } : props;-          const propFilterFn = shouldForwardProp || (isTargetTag && validAttr);-          const propsForElement = {};-          let key;--          for (key in computedProps) {-            if (key[0] === '$' || key === 'as') continue;-            else if (key === 'forwardedAs') {-              propsForElement.as = props[key];-            } else if (!propFilterFn || propFilterFn(key, validAttr)) {-              // Don't pass through filtered tags through to native elements-              propsForElement[key] = computedProps[key];-            }-          }--          propsForElement.style = [generatedStyles].concat(style);--          if (forwardedRef) propsForElement.ref = forwardedRef;-          if (forwardedAs) propsForElement.as = forwardedAs;--          return createElement(elementToBeRendered, propsForElement);-        }}-      </ThemeConsumer>-    );-  }+function useResolvedAttrs<Config>(theme: any = EMPTY_OBJECT, props: Config, attrs: Attrs) {+  // NOTE: can't memoize this+  // returns [context, resolvedAttrs]+  // where resolvedAttrs is only the things injected by the attrs themselves+  const context = { ...props, theme };+  const resolvedAttrs = {};++  attrs.forEach(attrDef => {+    let resolvedAttrDef = attrDef;+    let key;++    if (isFunction(resolvedAttrDef)) {+      resolvedAttrDef = resolvedAttrDef(context);+    } -  buildExecutionContext(theme: ?Object, props: Object, attrs: Attrs) {-    const context = { ...props, theme };+    /* eslint-disable guard-for-in */+    for (key in resolvedAttrDef) {+      context[key] = resolvedAttrs[key] = resolvedAttrDef[key];+    }+    /* eslint-enable guard-for-in */+  }); -    if (!attrs.length) return context;+  return [context, resolvedAttrs];+} -    this.attrs = {};+interface StyledComponentWrapperProperties {+  attrs: Attrs;+  inlineStyle: Function;+  displayName: string;+  foldedComponentIds: Array<string>;+  target: Target;+  shouldForwardProp: ?(prop: string, isValidAttr: (prop: string) => boolean) => boolean;+  styledComponentId: string;+} -    attrs.forEach(attrDef => {-      let resolvedAttrDef = attrDef;-      let attr;-      let key;+type StyledComponentWrapper<Config, Instance> = AbstractComponent<Config, Instance> &+  StyledComponentWrapperProperties; -      if (isFunction(resolvedAttrDef)) {-        resolvedAttrDef = resolvedAttrDef(context);-      }+// Validator defaults to true if not in HTML/DOM env+const validAttr = () => true; -      /* eslint-disable guard-for-in */-      for (key in resolvedAttrDef) {-        attr = resolvedAttrDef[key];-        this.attrs[key] = attr;-        context[key] = attr;-      }-      /* eslint-enable */-    });+function useStyledComponentImpl<Config: {}, Instance>(+  forwardedComponent: StyledComponentWrapper<Config, Instance>,+  props: Object,+  forwardedRef: Ref<any>+) {+  const {+    attrs: componentAttrs,+    inlineStyle,+    // $FlowFixMe+    defaultProps,+    // $FlowFixMe+    shouldForwardProp,+    styledComponentId,+    target,+  } = forwardedComponent; -    return context;-  }+  useDebugValue(styledComponentId); -  generateAndInjectStyles(theme: any, props: any) {-    const { inlineStyle } = props.forwardedComponent;+  // NOTE: the non-hooks version only subscribes to this when !componentStyle.isStatic,+  // but that'd be against the rules-of-hooks. We could be naughty and do it anyway as it+  // should be an immutable value, but behave for now.+  const theme = determineTheme(props, useContext(ThemeContext), defaultProps); -    const executionContext = this.buildExecutionContext(-      theme,-      props,-      props.forwardedComponent.attrs-    );+  const [context, attrs] = useResolvedAttrs(theme || EMPTY_OBJECT, props, componentAttrs); -    return inlineStyle.generateStyleObject(executionContext);-  }+  const generatedStyles = inlineStyle.generateStyleObject(context); -  setNativeProps(nativeProps: Object) {-    if (this.root !== undefined) {-      // $FlowFixMe-      this.root.setNativeProps(nativeProps);-    } else if (process.env.NODE_ENV !== 'production') {-      // eslint-disable-next-line no-console-      console.warn(-        'setNativeProps was called on a Styled Component wrapping a stateless functional component.'-      );+  const refToForward = forwardedRef;++  const elementToBeCreated: Target = attrs.$as || props.$as || attrs.as || props.as || target;++  const isTargetTag = isTag(elementToBeCreated);+  const computedProps = attrs !== props ? { ...props, ...attrs } : props;+  const propFilterFn = shouldForwardProp || (isTargetTag && validAttr);+  const propsForElement = {};++  // eslint-disable-next-line guard-for-in+  for (const key in computedProps) {+    if (key[0] === '$' || key === 'as') continue;+    else if (key === 'forwardedAs') {+      propsForElement.as = computedProps[key];+    } else if (!propFilterFn || propFilterFn(key, validAttr)) {+      // Don't pass through non HTML tags through to HTML elements+      propsForElement[key] = computedProps[key];     }   }++  propsForElement.style = [generatedStyles].concat(props.style || []);++  propsForElement.ref = refToForward;++  return createElement(elementToBeCreated, propsForElement); }  export default (InlineStyle: Function) => {   const createStyledNativeComponent = (target: Target, options: Object, rules: RuleSet) => {+    const isTargetStyledComp = isStyledComponent(target);+    const isCompositeComponent = !isTag(target);+     const {-      attrs = EMPTY_ARRAY,       displayName = generateDisplayName(target),-      ParentComponent = StyledNativeComponent,+      componentId = generateId(options.displayName, options.parentComponentId),+      attrs = EMPTY_ARRAY,     } = options; -    const isClass = !isTag(target);-    const isTargetStyledComp = isStyledComponent(target);--    // $FlowFixMe-    const WrappedStyledNativeComponent = React.forwardRef((props, ref) => (-      <ParentComponent-        {...props}-        forwardedComponent={WrappedStyledNativeComponent}-        forwardedRef={ref}-      />-    ));+    const styledComponentId =

I’m not sure if this is needed for native, it seems to be only used by useDebugValue.

janicduplessis

comment created time in 3 days

delete branch janicduplessis/react-native-screens

delete branch : fix-transition-end

delete time in 3 days

PR opened styled-components/styled-components

Update StyledNativeComponent to hooks

This tries to follow the same structure as StyledComponent.js while making the required changes for react-native.

Differences from StyledComponent.js

  • Use InlineStyle instead of ComponentStyle
  • Remove special className handling
  • Remove too many classes warning

Differences from class implementation:

  • Removed setNativeProps warning. This is actually tricky to do with hooks and I didn't see much value added from this warning.

Test plan

  • Tests / flow pass
  • Tested the a large RN app using styled components still renders as before
  • Tested that styled components render nicely in React DevTools (No more context provider 🎉 )
+152 -135

0 comment

1 changed file

pr created time in 3 days

create barnchth3rdwave/styled-components

branch : native-hooks

created branch time in 3 days

startedstyled-components/styled-components

started time in 3 days

delete branch janicduplessis/expo

delete branch : patch-2

delete time in 3 days

delete branch janicduplessis/expo

delete branch : patch-1

delete time in 3 days

delete branch janicduplessis/expo

delete branch : patch-3

delete time in 3 days

push eventjanicduplessis/expo

Janic Duplessis

commit sha 55c228f8876a1f5762448b4b79e42823ebc3e574

[expo-updates] Support monorepos on Android

view details

push time in 4 days

PR opened expo/expo

[expo-updates] Support monorepos on iOS

Why

<!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. -->

How

<!-- How did you build this feature or fix this bug and why? -->

Test Plan

<!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. -->

+1 -1

0 comment

1 changed file

pr created time in 4 days

push eventjanicduplessis/expo

Janic Duplessis

commit sha 9511ff4cd262e71caaafa19f5d0aafd5181405c0

[expo-updates] Support monorepos on iOS

view details

push time in 4 days

PR opened expo/expo

Reviewers
[expo-updates] Support RN entryFile config in create-manifest-android.gradle

Why

Sister PR of #8415 for android

This allows reusing RN entryFile config when calling the packager for assets.

How

Use entryFile from react-native gradle config.

Test Plan

Tested this change in a project that uses a custom entryFile.

+4 -2

0 comment

1 changed file

pr created time in 4 days

push eventjanicduplessis/expo

Janic Duplessis

commit sha d0624ac07835ea95a0f4e301877994cb8a7f60fb

[expo-updates] Support RN entryFile config in create-manifest-android.gradle

view details

push time in 4 days

pull request commentsoftware-mansion/react-native-screens

feat: add translucent status bar handling

Does this work if translucent was set using system ui visibility flags instead of using the RN statusbar module?

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
WoLewicki

comment created time in 4 days

pull request commentth3rdwave/react-native-safe-area-context

Native SafeAreaView

Published as 2.0.0-beta.0

jacobp100

comment created time in 4 days

created tagth3rdwave/react-native-safe-area-context

tagv2.0.0-beta.0

A flexible way to handle safe area insets in JS. Also works on Android and Web!

created time in 4 days

push eventth3rdwave/react-native-safe-area-context

Janic Duplessis

commit sha f329afa7620f34eb5359864d0014b56d0139b5df

2.0.0-beta.0

view details

push time in 4 days

PR opened expo/expo

Reviewers
[updates] Support ENTRY_FILE env in create-manifest-ios.sh

Why

This allows configuring the index file used by metro. This is the same env variable used by the react-native-xcode.sh so it should just work for projects that are already configured using it.

How

Use the value of ENTRY_FILE to query the RN packager.

Test Plan

Tested in a project that uses a different ENTRY_FILE path.

+2 -1

0 comment

1 changed file

pr created time in 4 days

push eventjanicduplessis/expo

Janic Duplessis

commit sha 2264551b992e0a2db7b1e512650ed7296aaa1598

[updates] Support ENTRY_FILE env in create-manifest-ios.sh

view details

push time in 4 days

fork janicduplessis/expo

An open-source platform for making universal native apps with React. Expo runs on Android, iOS, and the web.

https://docs.expo.io/

fork in 4 days

push eventth3rdwave/react-native-safe-area-context

Jacob Parker

commit sha fc9a4ec145c584fb410f8fcaf578235679ae782e

Native SafeAreaView (#78) * Native SafeAreaView (iOS only) * Android, tests * revert unrelated change * revert unrelated change * Update examples * Fix wording * Add android implementation, change edges prop format * Update README.md Co-authored-by: Janic Duplessis <janicduplessis@gmail.com> * Update android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.java Co-authored-by: Jacob Parker <jacob.parker@wonderbill.com> Co-authored-by: Janic Duplessis <janicduplessis@gmail.com>

view details

push time in 4 days

PR merged th3rdwave/react-native-safe-area-context

Native SafeAreaView

Summary

  • Renames RNCSafeAreaView -> RNCSafeAreaProvider
  • Implements native SafeAreaView (as RNCSafeAreaView) avoiding JS bridge delay (iOS only for now)
  • Makes setting padding on SafeAreaView additive rather than replacing the safe area (breaking change)
  • Allows customising which edges to apply padding to on SafeAreaView

Android implementation to come at a later date

Test Plan

Verify SafeAreaView still works. Verify adding padding works additively (rather than replacing). Verify setting edges prop.

+1023 -277

2 comments

36 changed files

jacobp100

pr closed time in 4 days

startedreact-native-community/bob

started time in 4 days

issue closedth3rdwave/react-native-safe-area-context

Unable to resolve module InitialWindowSafeAreaInsets

Description

On startup the following error is shown:

Simulator Screen Shot - iPhone 11 - 2020-05-14 at 11 07 37

Making the whole app unusable.

A temporary workaround: I went into the node_modules/react-native-safe-area-context/src/ folder and manually created the file InitialWindowSafeAreaInsets.tsx with no content.

Steps to reproduce

I'm not sure if this happened after I upgraded to the newest react native version, as this error was shown a week after upgrading. Also it might be because of upgrading to the newest react navigation library.

Versions

package.json

"@react-navigation/bottom-tabs": "^5.4.2",
"@react-navigation/native": "^5.3.0",
"@react-navigation/stack": "^5.3.3",
"react": "16.13.1",
"react-native": "0.62.2",
"react-native-safe-area-context": "^1.0.0",
"@react-native-community/masked-view": "^0.1.10",
"react-native-screens": "^2.7.0",

System

react-native info

info Fetching system and libraries information...
System:
    OS: macOS 10.15.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 14.63 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.2.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 25, 28, 29
      Build Tools: 28.0.3, 29.0.3, 30.0.0
      System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

closed time in 4 days

mrousavy

issue commentth3rdwave/react-native-safe-area-context

Android: False change of the bottom inset.

What version of android are you using?

DenysZP

comment created time in 4 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView

 package com.th3rdwave.safeareacontext; +import static com.facebook.react.uimanager.UIManagerHelper.getReactContext;+ import android.annotation.SuppressLint; import android.content.Context;+import android.util.Log;

Remove

jacobp100

comment created time in 4 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView

 class ClassComponent extends React.Component {   render() {     return (       <SafeAreaInsetsContext.Consumer>-        {insets => <View style={{ paddingTop: insets.top }} />}+        {(insets) => <View style={{ paddingTop: insets.top }} />}       </SafeAreaInsetsContext.Consumer>     );   } } ``` -Usage with `SafeAreaView`:--```js-import { SafeAreaView } from 'react-native-safe-area-context';--function SomeComponent() {-  return (-    <SafeAreaView>-      <View />-    </SafeAreaView>-  );-}-```--### Web SSR+## Web SSR  If you are doing server side rendering on the web you can use `initialMetrics` to inject insets and frame value based on the device the user has, or simply pass zero values. Since insets measurement is async it will break rendering your page content otherwise. -### Optimization+## Optimization++If you can, use `SafeAreaView`. It's implemented natively on iOS so when rotating the device, there is no delay from the asynchronous bridge. A native Android implementation is upcoming.
If you can, use `SafeAreaView`. It's implemented natively so when rotating the device, there is no delay from the asynchronous bridge.
jacobp100

comment created time in 4 days

delete branch janicduplessis/react-navigation

delete branch : rnsac-1.0

delete time in 4 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

 {   "name": "react-native-safe-area-context",-  "version": "1.0.2",+  "version": "2.0.0",

Leave the version like this I'll take care of updating that when doing a release.

jacobp100

comment created time in 5 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

+#import <React/RCTConvert.h>+#import "RNCSafeAreaViewEdges.h"++@implementation RCTConvert (RNCSafeAreaView)++RCT_ENUM_CONVERTER(RNCSafeAreaViewEdges, (@{

I don't mind keeping the bitmap as an implementation detail thought.

jacobp100

comment created time in 5 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

+// Simplified version of https://github.com/facebook/react-native/blob/master/React/Views/RNCSafeAreaView/RCTRNCSafeAreaView.m

I think it was there before but can you remove this comment, it is not really relevent anymore.

jacobp100

comment created time in 5 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

+#import <React/RCTConvert.h>+#import "RNCSafeAreaViewEdges.h"++@implementation RCTConvert (RNCSafeAreaView)++RCT_ENUM_CONVERTER(RNCSafeAreaViewEdges, (@{

Not a fan of this API, what about using something like:

export type Edges = {
  top?: boolean;
  bottom?: boolean;
  left?: boolean;
  right?: boolean;
};

type Props = {
  disableEdges: Edges;
  // or
  edges: Edges;
};

<SafeAreaView disableEdges={{top: true}} />
// or
<SafeAreaView edges={{top: false}} />
jacobp100

comment created time in 5 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

+#import "RNCSafeAreaProviderManager.h"++#import "RNCSafeAreaProvider.h"++@implementation RNCSafeAreaProviderManager++RCT_EXPORT_MODULE(RNCSafeAreaProvider)++RCT_EXPORT_VIEW_PROPERTY(onInsetsChange, RCTBubblingEventBlock)+++ (BOOL)requiresMainQueueSetup+{+  return YES;+}++- (UIView *)view+{+  return [RNCSafeAreaProvider new];+}++- (NSDictionary *)constantsToExport+{+  if (@available(iOS 11.0, *)) {+    UIWindow* window = [[UIApplication sharedApplication] keyWindow];+    UIEdgeInsets safeAreaInsets = window.safeAreaInsets;+    return @{+      @"initialWindowMetrics": @{+        @"insets": @{+          @"top": @(safeAreaInsets.top),+          @"right": @(safeAreaInsets.right),+          @"bottom": @(safeAreaInsets.bottom),+          @"left": @(safeAreaInsets.left),+        },+        @"frame": @{+          @"x": @(window.frame.origin.x),+          @"y": @(window.frame.origin.y),+          @"width": @(window.frame.size.width),+          @"height": @(window.frame.size.height),+        },+      }+    };+  } else {+    return @{ @"initialWindowSafeAreaInsets": [NSNull null] };

I just realized this should be initialWindowMetrics and not initialWindowSafeAreaInsets, would you mind fixing it while here?

jacobp100

comment created time in 5 days

Pull request review commentth3rdwave/react-native-safe-area-context

Native SafeAreaView (iOS only)

 export default function App() {     DevSettings.addMenuItem('Show Native Stack Example', () => {       setCurrentExample('native-stack');     });-    DevSettings.addMenuItem('Show React Native Safe Area View Example', () => {-      setCurrentExample('react-native-safe-area-view');-    });   }, []);    switch (currentExample) {-    case 'simple':-      return <SimpleExample />;+    case 'safe-area-view':+      return <SafeAreaViewExample />;+    case 'hooks':+      return <HooksExample />;     case 'react-navigation-4':       return <ReactNavigation4Example />;     case 'react-navigation-5':       return <ReactNavigation5Example />;     case 'native-stack':       return <NativeStackExample />;-    case 'react-native-safe-area-view':

Let's leave this example, I added to avoid breaking react-native-safe-area-view since it uses this library.

jacobp100

comment created time in 5 days

push eventjanicduplessis/react-native

Joshua Gross

commit sha 8ca5594549455a18cb64b15a5468f696d177d81f

All `measure*` calls should use the latest committed version of a ShadowNode Summary: Because of StateReconciliation (?) it is possible, even likely, that eventually the ShadowNode that ReactJS holds onto will not be the latest ShadowNode, and will not contain the latest LayoutMetrics. This fixes the problem by always resolving the latest committed version of the ShadowNode before measuring it. Changelog: [Internal] Fabric measure bugfix Reviewed By: sammy-SC, mdvacca Differential Revision: D21248472 fbshipit-source-id: a4f034c36d89a91a804f3b4cdf35e7ae748a1b91

view details

simek

commit sha dfdbf41cc3a9f4d8eb20ab4dd45a1d10a27d11c5

chore: remove tvOS from the e2e CI tests (#28743) Summary: Refs https://github.com/facebook/react-native/issues/28706 This small PR removes `tvOS` platform and `HelloWorld-tvOS` references from the e2e CI tests script. Also a small typo in comment has been fixed. CC: dlowder-salesforce ## Changelog [Internal] [Removed] - remove tvOS from the e2e CI tests Pull Request resolved: https://github.com/facebook/react-native/pull/28743 Test Plan: Exec during `node ./scripts/run-ci-e2e-tests.js --ios` was successful. Differential Revision: D21252185 Pulled By: shergin fbshipit-source-id: 56981f2c5c3038412e9f37a81084de87e296d7d2

view details

Jakub Kinst

commit sha b020e7c440f58dabd4cc64b72869f3ae9680ef30

Fix calculating View position within a Window in split-screen mode on Android (#28449) Summary: On Android, when using split-screen mode, the Window-relative position of a native View is not calculated properly when the app is running on the right (or bottom) half of the screen. The coordinates are currently calculated only based on View.getLocationOnScreen() with subtracting status bar height. Scenarios, where the window does not fill the entire screen (such as split-screen mode) are not supported. We need to use a more general solution to subtract the actual position of the window from position of the view within the screen. This PR fixes the issue by subtracting coordinates of the Window retrieved from View.getWindowVisibleDisplayFrame(), which covers all scenarios when Window can be in a different position than the screen (incl. status bar offset). ## Changelog [Android] [Fixed] - Calculating view position within the window in split-screen mode Pull Request resolved: https://github.com/facebook/react-native/pull/28449 Test Plan: 1. Run an app in split-screen mode on the right half of the screen 2. Call UIManagerModule.measureInWindow() from JS to fetch a position of a View within a Window 3. Observe the wrong coordinates returned 4. Try the same with the fix Reviewed By: mdvacca Differential Revision: D21246297 Pulled By: shergin fbshipit-source-id: 1f54b1a5d6610be17bf05521200304db2ba263ab

view details

Paige Sun

commit sha e3e900805b2857ac76b7e5eeb1489a9c0fa0da46

Fix image instrumentation internal lifecycle Reviewed By: fkgozali Differential Revision: D20980822 fbshipit-source-id: d0a4a031046509425fbf6662471246ed2ab48a4c

view details

Samuel Susla

commit sha e68f9bf76846dbbc767ec4dbcabc9d83adb5f0dd

Calling Paper TextInput setTextAndSelection view command now dirties layout Summary: Changelog: [Internal] Previously `setTextAndSelection` was not dirtying layout. This would cause an issue where `setTextAndSelection` causes layout change. For example calling setTextAndSelection with empty string on a multiline auto expanding text input. I changed one example in TextInputSharedExamples.js, "Live Re-Write (no spaces allowed) and clear" example is now multiline. This allows to test whether `setTextAndSelection` dirties layout. Enter multiline string to to the example text input and press clear. Observe that the text input shrinks to single line height. Reviewed By: shergin Differential Revision: D21182990 fbshipit-source-id: de8501ea0b97012cf4cdf8d5f658649139f92da6

view details

Samuel Susla

commit sha 5cf327ed837862c8d3611320e1d914f5a3401595

Blur image in Image component if blurRadius prop is provided Summary: Apply `blurRadius` prop once image is loaded. Changelog: [Internal][iOS] Reviewed By: mdvacca Differential Revision: D21227536 fbshipit-source-id: 241aa45f253a06d61e861f6719f14fabf3467b56

view details

Valentin Shergin

commit sha a4b15a4a8821181cf272775188d0006f899d6b9f

Fabric: Marking TextInput as a leaf Yoga node Summary: TextInput must have `LeafYogaNode` trait to be able contain non-yoga nodes. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D21252322 fbshipit-source-id: 820f3ae4811cb475550419af501739c57c7164e1

view details

Emily Janzer

commit sha 79d5b20ced38d774aad6ccc8394a684604062bce

Move RuntimeExecutor to its own BUCK module (#28730) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/28730 Moving RuntimeExecutor out of react/utils and into its own subdir of ReactCommon. I'm doing this because I'm going to be pulling this into CatalystInstance on Android, and I don't want to pull in all the files we don't need there; also, this should hopefully make the OSS NDK stuff easier (this uses the react/utils prefix to export, and I'm not sure if you can include a '/' in a gradle module name?) Changelog: [Internal] Reviewed By: shergin, mdvacca Differential Revision: D21098528 fbshipit-source-id: 9fbd72901ece522b1caec3ec34fafb8f9b327275

view details

Samuel Susla

commit sha 027e8f9b1600c931aa4b826b905a67969733c6ea

Send key when onKeyPress event is fired from TextInput Summary: Changelog: [Internal] In `onKeyPress` event, we were not returning `key` property. This diff adds `key` property to `onKeyPress` event and removes other, redundant properties from `onKeyPress` event. The implementation has been translated from Paper. Reviewed By: shergin Differential Revision: D21250411 fbshipit-source-id: f1e31381667acb9dec02d0b33883df8f8f5b2a4b

view details

Samuel Susla

commit sha b871979a8986f4c832abb42ac7d3c127972496e3

Do not send events for changes coming from JavaScript Summary: Changelog: [Internal] When there is a change coming from javascript, avoid triggering `onChange ` and `onSelectionChange` events since JavaScript already has these changes. This is only necessary for multiline text. For changes coming through view commands, do not increment `_mostRecentEventCount`. Reviewed By: shergin Differential Revision: D21255228 fbshipit-source-id: e972dab0eb3dd21f611ee5c71d755bab593ae9cc

view details

Valentin Shergin

commit sha 26d3bcae721098d8d0574f3a6f523a70d4a4d133

Fabric: Increasing threshold for MountingTelemetryTest Summary: We neede that to make the test less flaky. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D21261487 fbshipit-source-id: afec45e03be10ba071a5ab808ce13f95b5f475e3

view details

yogevbd

commit sha 702ff6d1cdc378815ff1beb563c2c8cc4f30585c

iOS: Fix refreshControl layouting (#28236) Summary: In `react-native-navigation` we allow the usage of native iOS navigationBar **largeTitle** which cause the title to "jump" when pulling to refresh. We found that the layout calculations of the refreshControl element mess up the system behaviour. ## Changelog [iOS] [Fixed] - Fix refreshControl messes up navigationBar largeTitles Pull Request resolved: https://github.com/facebook/react-native/pull/28236 Test Plan: ### Before the fix: ![before](https://user-images.githubusercontent.com/10794586/75991307-f7c7ec00-5efe-11ea-8cd9-ab8c3fbe1dc1.gif) ### And after: ![after](https://user-images.githubusercontent.com/10794586/75990618-d9152580-5efd-11ea-8c72-5deb6d83a840.gif) ### How it looks like with react-native init app after the fix: ![ezgif com-video-to-gif (4)](https://user-images.githubusercontent.com/10794586/77253369-54970680-6c62-11ea-9ad6-3265e23044e6.gif) Differential Revision: D20587945 Pulled By: shergin fbshipit-source-id: 94f560b17e367f4ef5e789f40c052396949b51a3

view details

Sidharth Guglani

commit sha fc5a626e38dc64539b3705e4147179e6e3d84e7c

Fix rounding error using double instead of float Summary: Changelog: [Internal] [Yoga] Use double instead of float during rounding process to prevent loss of precision. Reviewed By: mdvacca Differential Revision: D21227565 fbshipit-source-id: 380b57535a356624cda8dc2017871a4ef3c882d1

view details

Samuel Susla

commit sha 81bdeade544eba065c2b85692c7604b0f1c21105

Fix broken touches on all Fabric surfaces Reviewed By: shergin Differential Revision: D21261996 fbshipit-source-id: f42c19295ac127eca653631faad0ced4900f4758

view details

Lulu Wu

commit sha 423b55b2d7253fa1736c7f3e51fee1cc5c2e527d

Move ART Android files to FB internal Summary: ## Changelog: [General] [Changed] - Moves ART android files from RN to internal react shell. Reviewed By: cpojer Differential Revision: D21261077 fbshipit-source-id: 1d3dc404313192540d64991911e3599e3e86351b

view details

Mark Lord

commit sha b2b23a20170d12f6d8bf2733b93d7f9ab9c6cb15

Check en0..en8 when generating ip.txt for iOS debug builds (#28764) Summary: When generating ip.txt in an iOS debug build, search en0 through en8 for an IP address rather than only checking en0 and en1. For example, on my Mac, the IP address I needed to use was on en5 and the IP address actually detected was a private network of one of my Parallels virtual machines (interface vnic0). ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Search en0 through en8 for the Metro Bundler's IP address when generating iOS debug builds Pull Request resolved: https://github.com/facebook/react-native/pull/28764 Test Plan: Should make no difference to users for whom react-native-xcode.sh already worked. On a Mac with multiple virtual machines installed, should prevent ip.txt getting the private IP address of a virtual machine. Differential Revision: D21280671 Pulled By: shergin fbshipit-source-id: e6fe9c8344146626df96129968981462463201f7

view details

Ramanpreet Nara

commit sha 1cef72af047bd2e56d774858093f1ee6269c2d27

Part 1: Make CatalystInstanceImpl.getNativeModule Nullable Summary: ## Description When the TurboModule and the NativeModule systems are alive at the same time, after RN cleanup, if a TurboModule is required, we return `null` from TurboModuleManager. This causes `CatalystInstanceImpl.getNativeModule` to do a lookup on NativeModule registry, which throws an `AssertionError`, because the TurboModule isn't found. Instead of throwing an `AssertionError` from `CatalystInstanceImpl.getNativeModule`, this diff instead has that method return `null` in this particular case. ## Rationale This should eliminate the crashes we're seeing in T46487253. ## Future action In the future, we should guard `CatalystInstanceImpl.getNativeModule` with an `if (mDestroyed) return null;` statement. This'll ensure that if NativeModules are required after React Native has started cleanup, they'll be returned as `null`. Right now, we either return the destroyed NativeModule object, or create/initialize the NativeMoulde and return it, which is wrong. Changelog: [Android][Changed] - Make CatalystInstance.getNativeModule nullable Reviewed By: JoshuaGross Differential Revision: D21272029 fbshipit-source-id: 099ad9ab9fa2146299df4cf7f86ae7a8e526bb15

view details

Ramanpreet Nara

commit sha 9263eb5d3864a42925b699343db2c09cc8934ed0

Part 2: Make CatalystInstanceImpl.getNativeModule Nullable Summary: This is the codemod portion of the parent diff. I modified all call-sites to `ReactContext.getNativeModule` to do a null check on the returned NativeModule. Changelog: [Android][Fixed] - Check if NativeModules returned from CatalystInstanceImpl.getNativeModule are null before using them. Reviewed By: JoshuaGross Differential Revision: D21272028 fbshipit-source-id: 6bd16c6bf30605f2dfdf4c481352063712965342

view details

Valentin Shergin

commit sha 79bc7f9fad78e15cacadd8426bd33bf5f571a192

Revert D20587945: iOS: Fix refreshControl layouting Differential Revision: D20587945 Original commit changeset: 94f560b17e36 fbshipit-source-id: e8ec95b2ea8632ef09e132351a1458cf97671206

view details

Ramanpreet Nara

commit sha 3d20f49aff5a1af61921258ab1d80f598e021803

Back out "Control concurrent calls into TMMDelegate from TMM" Summary: Original commit changeset: d22c4abfe87f This synchronization is redundant. See D21025965. Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D21283284 fbshipit-source-id: dae737fe08bbc8f60913baa6c6a58228611257ef

view details

push time in 5 days

push eventfacebook/react-native-fbsdk

luancurti

commit sha 17af77b48ad6ea62fa3c0f552cd8f6a699ef6a64

Fix react native peer dependencies (#700) * Fix react native peer dependencies * Update package.json Co-authored-by: Janic Duplessis <janicduplessis@gmail.com>

view details

push time in 7 days

PR merged facebook/react-native-fbsdk

Reviewers
Fix react native peer dependencies CLA Signed

I'm using react-native: 0.59.10 and when I install I see this warning: react-native-fbsdk@1.1.2 has incorrect peer dependency "react-native@>=0.60.0"

Test Plan:

When install the package this warning should not appear

+1 -1

1 comment

1 changed file

luancurti

pr closed time in 7 days

pull request commentfacebook/react-native-fbsdk

Fix react native peer dependencies

I think it was like this because of androidx but looks like it works anyway with reverse jetifier now. I changed it to >=0.59.0 because I doubt we support much lower than that.

luancurti

comment created time in 7 days

push eventluancurti/react-native-fbsdk

Janic Duplessis

commit sha eeb840eb0bb29d710d0ccbe81ea8c596e6d9831d

Update package.json

view details

push time in 7 days

more