Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Sync versions of react packages
Browse files Browse the repository at this point in the history
  • Loading branch information
sapkra committed Mar 9, 2019
1 parent 6142a87 commit ca975b4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 50 deletions.
2 changes: 1 addition & 1 deletion examples/typescript/src/Character.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface CharacterProps {
episode: Episode;
}

export const Character: React.SFC<CharacterProps> = props => {
export const Character: React.FC<CharacterProps> = props => {
const { episode } = props;

return (
Expand Down
73 changes: 36 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
"@types/jest": "24.0.9",
"@types/object-assign": "4.0.30",
"@types/prop-types": "15.7.0",
"@types/react": "16.4.18",
"@types/react-dom": "16.8.0",
"@types/react-test-renderer": "16.8.0",
"@types/react": "16.8.4",
"@types/react-dom": "16.8.2",
"@types/react-test-renderer": "16.8.1",
"@types/recompose": "0.30.3",
"@types/zen-observable": "0.8.0",
"apollo-cache": "1.2.1",
Expand All @@ -142,9 +142,9 @@
"preact": "8.4.2",
"preact-compat": "3.18.4",
"prettier": "1.16.4",
"react": "16.5.2",
"react-dom": "16.8.1",
"react-test-renderer": "16.8.1",
"react": "16.8.4",
"react-dom": "16.8.4",
"react-test-renderer": "16.8.4",
"recompose": "0.30.0",
"recursive-rename": "2.0.0",
"rimraf": "2.6.3",
Expand Down
2 changes: 1 addition & 1 deletion src/ApolloConsumer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface ApolloConsumerProps {
children: (client: ApolloClient<any>) => React.ReactElement<any> | null;
}

const ApolloConsumer: React.StatelessComponent<ApolloConsumerProps> = (props, context) => {
const ApolloConsumer: React.FC<ApolloConsumerProps> = (props, context) => {
invariant(
!!context.client,
`Could not find "client" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>`,
Expand Down
8 changes: 4 additions & 4 deletions test/client/getDataFromTree.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ describe('SSR', () => {
variables: { id: data!.currentUser!.id },
}),
});
const Component: React.StatelessComponent<WithUserChildProps> = ({ data }) => (
const Component: React.FC<WithUserChildProps> = ({ data }) => (
<div>{!data || data.loading || !data.user ? 'loading' : data.user.firstName}</div>
);

Expand Down Expand Up @@ -860,7 +860,7 @@ describe('SSR', () => {

const WrappedBorkedComponent = withLastName(BorkedComponent);

const ContainerComponent: React.StatelessComponent<WithLastNameProps> = ({ data }) => (
const ContainerComponent: React.FC<WithLastNameProps> = ({ data }) => (
<div>
{!data || data.loading || !data.currentUser ? 'loading' : data.currentUser.lastName}
<WrappedBorkedComponent />
Expand Down Expand Up @@ -1408,7 +1408,7 @@ describe('SSR', () => {
},
});

const Element: React.StatelessComponent<
const Element: React.FC<
QueryChildProps & { action: (variables: {}) => Promise<any> }
> = ({ data }) => (
<div>{data.loading || !data.currentUser ? 'loading' : data.currentUser.firstName}</div>
Expand Down Expand Up @@ -1484,7 +1484,7 @@ describe('SSR', () => {
},
});

const Element: React.StatelessComponent<
const Element: React.FC<
ChildProps<ChildProps<Props, MutationData>, QueryData, {}>
> = ({ data }) => (
<div>
Expand Down
2 changes: 1 addition & 1 deletion test/test-utils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ it('allows for using a custom cache', done => {
data: { user },
});

const Container: React.SFC<ChildProps<Variables, Data, Variables>> = props => {
const Container: React.FC<ChildProps<Variables, Data, Variables>> = props => {
expect(props.data).toMatchObject({ user });
done();

Expand Down

0 comments on commit ca975b4

Please sign in to comment.