Skip to content

Commit

Permalink
Deprecate LazyLoadEntryPointContainer => LazyLoadEntryPointContainer_…
Browse files Browse the repository at this point in the history
…DEPRECATED

Reviewed By: josephsavona

Differential Revision: D18485797

fbshipit-source-id: 6b1cb2b3ba8ea8fe43a3986632b0e11b6455acba
  • Loading branch information
Juan Tejada authored and facebook-github-bot committed Nov 14, 2019
1 parent f1e2e79 commit 08bde91
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function stableStringify(value: mixed): string {
return JSON.stringify(stableCopy(value)) ?? 'null';
}

function LazyLoadEntryPointContainer<
function LazyLoadEntryPointContainer_DEPRECATED<
TEntryPointParams: {},
TPreloadedQueries: {},
TPreloadedEntryPoints: {},
Expand Down Expand Up @@ -101,4 +101,4 @@ function LazyLoadEntryPointContainer<
);
}

module.exports = LazyLoadEntryPointContainer;
module.exports = LazyLoadEntryPointContainer_DEPRECATED;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jest.mock('fbjs/lib/ExecutionEnvironment', () => ({
canUseDOM: true,
}));

const LazyLoadEntryPointContainer = require('../LazyLoadEntryPointContainer.react');
const LazyLoadEntryPointContainer_DEPRECATED = require('../LazyLoadEntryPointContainer_DEPRECATED.react');
const React = require('react');
const RelayEnvironmentProvider = require('../RelayEnvironmentProvider');
const TestRenderer = require('react-test-renderer');
Expand Down Expand Up @@ -130,7 +130,7 @@ it('suspends while the query and component are pending', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 0}}
entryPointParams={{id: '4'}}
Expand All @@ -152,7 +152,7 @@ it('suspends while the component is loading', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 0}}
entryPointParams={{id: '4'}}
Expand All @@ -174,7 +174,7 @@ it('suspends while the query is loading', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 0}}
entryPointParams={{id: '4'}}
Expand All @@ -193,7 +193,7 @@ it('suspends then updates when the query and component load', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={{id: '4'}}
Expand Down Expand Up @@ -242,7 +242,7 @@ it('renders synchronously when the query and component are already loaded', () =
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={{id: '4'}}
Expand Down Expand Up @@ -271,7 +271,7 @@ it('re-renders without reloading when non-prefetch props change', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 0}}
entryPointParams={{id: '4'}}
Expand All @@ -284,7 +284,7 @@ it('re-renders without reloading when non-prefetch props change', () => {
renderer.update(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 1 /* different value */}}
entryPointParams={{id: '4'}}
Expand Down Expand Up @@ -312,7 +312,7 @@ it('re-renders and reloads when prefetch params change', () => {
const renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={{id: '4'}}
Expand All @@ -325,7 +325,7 @@ it('re-renders and reloads when prefetch params change', () => {
renderer.update(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={{id: '_4'} /* different id */}
Expand Down Expand Up @@ -379,7 +379,7 @@ it('fetches and renders synchronously when the query data is cached, then update
renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={variables}
Expand Down Expand Up @@ -443,7 +443,7 @@ it('renders synchronously when the query data and ast are cached, without fetchi
renderer = TestRenderer.create(
<RelayEnvironmentProvider environment={environment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={otherProps}
entryPointParams={variables}
Expand Down Expand Up @@ -497,7 +497,7 @@ it('should use environment from `getEnvironment` prop to fetch a query', () => {
TestRenderer.create(
<RelayEnvironmentProvider environment={defaultEnvironment}>
<React.Suspense fallback="Fallback">
<LazyLoadEntryPointContainer
<LazyLoadEntryPointContainer_DEPRECATED
entryPoint={entryPoint}
props={{version: 0}}
entryPointParams={{id: '4'}}
Expand Down
4 changes: 2 additions & 2 deletions packages/relay-experimental/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'use strict';

const EntryPointContainer = require('./EntryPointContainer.react');
const LazyLoadEntryPointContainer = require('./LazyLoadEntryPointContainer.react');
const LazyLoadEntryPointContainer_DEPRECATED = require('./LazyLoadEntryPointContainer_DEPRECATED.react');
const MatchContainer = require('./MatchContainer');
const ProfilerContext = require('./ProfilerContext');
const RelayEnvironmentProvider = require('./RelayEnvironmentProvider');
Expand Down Expand Up @@ -41,7 +41,7 @@ export type {

module.exports = {
EntryPointContainer: EntryPointContainer,
LazyLoadEntryPointContainer: LazyLoadEntryPointContainer,
LazyLoadEntryPointContainer_DEPRECATED: LazyLoadEntryPointContainer_DEPRECATED,
MatchContainer: MatchContainer,
ProfilerContext: ProfilerContext,
RelayEnvironmentProvider: RelayEnvironmentProvider,
Expand Down

0 comments on commit 08bde91

Please sign in to comment.