Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Rubén Norte c6d77a8570 Make some modules flow strict
Summary:
TSIA

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28412774

fbshipit-source-id: 899a78e573bb49633690275052d5e7cb069327fb
2021-05-14 04:23:21 -07:00
Rubén Norte d87542ee4c Create usePerformanceLogger hook
Summary:
Having to import `useContext` every time is annoying, so this just creates a convenience function to get it.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D28258305

fbshipit-source-id: 7293478f9baa11711a541f987225108871688e0e
2021-05-10 07:21:25 -07:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00
Brian Vaughn 68a476103a Name a bunch of anonymous RN contexts
Summary:
Changelog:
[General] [Changed] - Added (DEV-only) `displayName` to some RN contexts to make them more easy to differentiate when debugging.

Reviewed By: lunaleaps

Differential Revision: D24993068

fbshipit-source-id: 4904259eda50444c2f74700a3540ff4fd02ac322
2020-11-16 13:12:09 -08:00
Eli White e362470305 Convert easy files to flow strict-local
Summary:
This diff was generated by this script used by WWW
https://our.intern.facebook.com/intern/diffusion/WWW/browse/master/scripts/flow/upgrade_to_flow_strict_local.sh?lines=0

Changelog:
[Internal] Upgrade flow to flow strict-local

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D18833630

fbshipit-source-id: e64d4e9a49a0db5e6bf70a0c489567862b578d7f
2019-12-05 16:06:46 -08:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Alexey Lang 022dc8ef38 Implement withPerformanceLoggerContext
Summary:
This function returns a HOC that passes `scopedPerformanceLogger` as a prop to the wrapped component. That HOC
can be used whenever we can't declare `static contextType` as `PerformanceLoggerContext` on a component,
for example because React supports only one React Context per component.

Reviewed By: sahrens

Differential Revision: D14385560

fbshipit-source-id: 41971b4bf499f336c34b9220a3ee97c4ed89498d
2019-03-15 07:38:00 -07:00
Peter van der Zee dcd4e90d9a Bump Prettier to 1.16.4
Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
2019-03-14 07:00:27 -07:00
Alexander Zhang efd28bdc84 Revert D14186694: [RN] Use global or scoped performance loggers everywhere
Differential Revision:
D14186694

Original commit changeset: 062c76eea8fc

fbshipit-source-id: 6d99b94d21da6df4375e342fdecceeebf05959d5
2019-03-07 13:12:12 -08:00
Alexey Lang a9b3ca7fa7 Use global or scoped performance loggers everywhere
Summary:
I'm changing all callsites to use either global or scoped perf logger explicitly in one diff.
`GlobalPerformanceLogger` is basically a singleton
`scopedPerformanceLogger` is scoped to the React tree by using a React Context

Reviewed By: sahrens

Differential Revision: D14186694

fbshipit-source-id: 062c76eea8fce9d9b531f0eddf153bb79d52f68d
2019-03-06 09:51:56 -08:00
Alexey Lang 60640485e1 Introduce PerformanceLoggerContext and use it with renderApplication
Reviewed By: sahrens

Differential Revision: D14167646

fbshipit-source-id: 3f8dd27ba1c8866471e2af493c4cc0bc84706042
2019-02-28 03:39:40 -08:00