Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) - make all components in examples have displayNames in devtools #330

Merged
merged 4 commits into from Jul 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/1-getting-started/src/app/Home.tsx
Expand Up @@ -46,6 +46,8 @@ export const Home: FC = () => {
);
};

Home.displayName = 'Home';

const TodoQuery = gql`
query {
todos {
Expand Down
2 changes: 2 additions & 0 deletions examples/1-getting-started/src/app/components/Error.tsx
Expand Up @@ -7,3 +7,5 @@ export const Error: FC = props => (
<p>Message: {props.children}</p>
</>
);

Error.displayName = 'Error';
2 changes: 2 additions & 0 deletions examples/1-getting-started/src/app/components/Loading.tsx
@@ -1,3 +1,5 @@
import React from 'react';

export const Loading = () => <p>Loading...</p>;

Loading.displayName = 'Loading';
8 changes: 4 additions & 4 deletions examples/1-getting-started/src/app/components/Todo.tsx
Expand Up @@ -23,9 +23,9 @@ export const Todo: FC<Props> = props => {
Todo.displayName = 'Todo';

const RemoveTodo = `
mutation($id: ID!) {
toggleTodo(id: $id) {
id
mutation($id: ID!) {
andyrichardson marked this conversation as resolved.
Show resolved Hide resolved
toggleTodo(id: $id) {
id
}
}
}
`;
2 changes: 2 additions & 0 deletions examples/1-getting-started/src/app/index.tsx
Expand Up @@ -17,4 +17,6 @@ export const App: FC = () => (
</Provider>
);

App.displayName = 'App';

ReactDOM.render(<App />, document.getElementById('root'));
796 changes: 1 addition & 795 deletions examples/1-getting-started/yarn.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions examples/2-using-subscriptions/src/app/Messages.tsx
Expand Up @@ -31,6 +31,8 @@ export const Messages: FC = () => {
);
};

Messages.displayName = 'Messages';

const NewMessageSubQuery = gql`
subscription messageSub {
newMessages {
Expand Down
2 changes: 2 additions & 0 deletions examples/2-using-subscriptions/src/app/components/Error.tsx
Expand Up @@ -7,3 +7,5 @@ export const Error: FC = props => (
<p>Message: {props.children}</p>
</>
);

Error.displayName = 'Error';
2 changes: 2 additions & 0 deletions examples/2-using-subscriptions/src/app/components/Message.tsx
Expand Up @@ -16,3 +16,5 @@ export const Message: FC<MessageEntry> = props => (
<li>{props.message}</li>
</div>
);

Message.displayName = 'Message';
2 changes: 2 additions & 0 deletions examples/2-using-subscriptions/src/app/index.tsx
Expand Up @@ -38,4 +38,6 @@ export const App: FC = () => (
</Provider>
);

App.displayName = 'App';

ReactDOM.render(<App />, document.getElementById('root'));
749 changes: 7 additions & 742 deletions examples/2-using-subscriptions/yarn.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion examples/3-ssr-with-nextjs/components/App.js
@@ -1,4 +1,4 @@
export default ({ children }) => (
const App = ({ children }) => (
<main>
{children}
<style jsx global>{`
Expand Down Expand Up @@ -40,3 +40,5 @@ export default ({ children }) => (
`}</style>
</main>
);

export default App;
4 changes: 3 additions & 1 deletion examples/3-ssr-with-nextjs/components/ErrorMessage.js
@@ -1,4 +1,4 @@
export default ({ message }) => (
const ErrorMessage = ({ message }) => (
<aside>
{message}
<style jsx>{`
Expand All @@ -11,3 +11,5 @@ export default ({ message }) => (
`}</style>
</aside>
);

export default ErrorMessage;
4 changes: 3 additions & 1 deletion examples/3-ssr-with-nextjs/pages/index.js
Expand Up @@ -2,9 +2,11 @@ import App from '../components/App';
import Submit from '../components/Submit';
import PostList from '../components/PostList';

export default () => (
const Root = () => (
<App>
<Submit />
<PostList />
</App>
);

export default Root;