Skip to content

Commit cdc7f06

Browse files
committed
Update registerComponent calls to preferred syntax
Call `registerComponent` with object argument instead of rest parameters Executed following find & replace regex: * `registerComponent\(('[A-Za-z0-9]*'), ([A-Za-z0-9]*), (.*)\)` ➡ `registerComponent({ name: $1, component: $2, hocs: [$3] })` * `registerComponent\(('[A-Za-z0-9]*'), ([A-Za-z0-9]*)\)` ➡ `registerComponent({ name: $1, component: $2 })` Note: This change exacerbates VulcanJS/Vulcan#2061, and probably shouldn't be merged until that issue is resolved.
1 parent d72be2d commit cdc7f06

File tree

116 files changed

+116
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+116
-116
lines changed

packages/example-customization/lib/components/MyCustomPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ const MyCustomPage = () => {
1515
)
1616
}
1717

18-
registerComponent('MyCustomPage', MyCustomPage);
18+
registerComponent({ name: 'MyCustomPage', component: MyCustomPage });

packages/example-forms/lib/components/FormFunnel.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ FormFunnel.contextTypes = {
3939
updateCurrentValues: PropTypes.func,
4040
};
4141

42-
registerComponent('FormFunnel', FormFunnel);
42+
registerComponent({ name: 'FormFunnel', component: FormFunnel });

packages/example-forms/lib/components/Home.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ const Home = ({ flash }) => (
5353
</div>
5454
);
5555

56-
registerComponent('Home', Home, withMessages);
56+
registerComponent({ name: 'Home', component: Home, hocs: [withMessages] });

packages/example-forum/lib/components/categories/CategoriesDashboard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ const CategoriesDashboard = () =>
2727

2828
</div>
2929

30-
registerComponent('CategoriesDashboard', CategoriesDashboard);
30+
registerComponent({ name: 'CategoriesDashboard', component: CategoriesDashboard });

packages/example-forum/lib/components/categories/CategoriesEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ CategoriesEditForm.contextTypes = {
4040
intl: intlShape,
4141
};
4242

43-
registerComponent('CategoriesEditForm', CategoriesEditForm, withMessages);
43+
registerComponent({ name: 'CategoriesEditForm', component: CategoriesEditForm, hocs: [withMessages] });

packages/example-forum/lib/components/categories/CategoriesMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ const options = {
126126
pollInterval: 0,
127127
};
128128

129-
registerComponent('CategoriesMenu', CategoriesMenu, withRouter, withApollo, [withList, options], withCurrentUser);
129+
registerComponent({ name: 'CategoriesMenu', component: CategoriesMenu, hocs: [withRouter, withApollo, [withList, options], withCurrentUser] });

packages/example-forum/lib/components/categories/CategoriesNewForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ CategoriesNewForm.contextTypes = {
3131
intl: intlShape,
3232
};
3333

34-
registerComponent('CategoriesNewForm', CategoriesNewForm, withMessages);
34+
registerComponent({ name: 'CategoriesNewForm', component: CategoriesNewForm, hocs: [withMessages] });

packages/example-forum/lib/components/comments/CommentsEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ CommentsEditForm.propTypes = {
2626
cancelCallback: PropTypes.func
2727
};
2828

29-
registerComponent('CommentsEditForm', CommentsEditForm, withMessages);
29+
registerComponent({ name: 'CommentsEditForm', component: CommentsEditForm, hocs: [withMessages] });

packages/example-forum/lib/components/comments/CommentsItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ CommentsItem.propTypes = {
123123
flash: PropTypes.func,
124124
};
125125

126-
registerComponent('CommentsItem', CommentsItem, withMessages);
126+
registerComponent({ name: 'CommentsItem', component: CommentsItem, hocs: [withMessages] });

packages/example-forum/lib/components/comments/CommentsList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ const CommentsList = ({comments, commentCount, currentUser}) => {
2525

2626
CommentsList.displayName = "CommentsList";
2727

28-
registerComponent('CommentsList', CommentsList);
28+
registerComponent({ name: 'CommentsList', component: CommentsList });

packages/example-forum/lib/components/comments/CommentsLoadMore.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ const CommentsLoadMore = ({loadMore, count, totalCount}) => {
88

99
CommentsLoadMore.displayName = "CommentsLoadMore";
1010

11-
registerComponent('CommentsLoadMore', CommentsLoadMore);
11+
registerComponent({ name: 'CommentsLoadMore', component: CommentsLoadMore });

packages/example-forum/lib/components/comments/CommentsNewForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ CommentsNewForm.propTypes = {
4848
flash: PropTypes.func,
4949
};
5050

51-
registerComponent('CommentsNewForm', CommentsNewForm, withMessages);
51+
registerComponent({ name: 'CommentsNewForm', component: CommentsNewForm, hocs: [withMessages] });

packages/example-forum/lib/components/comments/CommentsNode.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ CommentsNode.propTypes = {
1717
comment: PropTypes.object.isRequired, // the current comment
1818
};
1919

20-
registerComponent('CommentsNode', CommentsNode);
20+
registerComponent({ name: 'CommentsNode', component: CommentsNode });

packages/example-forum/lib/components/common/Footer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ const Footer = props => {
1010

1111
Footer.displayName = "Footer";
1212

13-
registerComponent('Footer', Footer);
13+
registerComponent({ name: 'Footer', component: Footer });

packages/example-forum/lib/components/common/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ Header.propTypes = {
4444
currentUser: PropTypes.object,
4545
};
4646

47-
registerComponent('Header', Header, withCurrentUser);
47+
registerComponent({ name: 'Header', component: Header, hocs: [withCurrentUser] });

packages/example-forum/lib/components/common/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const Layout = ({currentUser, children, currentRoute}) =>
3333

3434
</div>
3535

36-
registerComponent('Layout', Layout, withCurrentUser);
36+
registerComponent({ name: 'Layout', component: Layout, hocs: [withCurrentUser] });

packages/example-forum/lib/components/common/Logo.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const Logo = ({logoUrl, siteTitle}) => {
2222

2323
Logo.displayName = "Logo";
2424

25-
registerComponent('Logo', Logo);
25+
registerComponent({ name: 'Logo', component: Logo });

packages/example-forum/lib/components/common/Newsletter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ function showBanner (user) {
116116
);
117117
}
118118

119-
registerComponent('Newsletter', Newsletter, withMutation(mutationOptions), withCurrentUser, withMessages);
119+
registerComponent({ name: 'Newsletter', component: Newsletter, hocs: [withMutation(mutationOptions), withCurrentUser, withMessages] });

packages/example-forum/lib/components/common/NewsletterButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ NewsletterButton.contextTypes = {
6060
const addOptions = {name: 'addUserNewsletter', args: {userId: 'String'}};
6161
const removeOptions = {name: 'removeUserNewsletter', args: {userId: 'String'}};
6262

63-
registerComponent('NewsletterButton', NewsletterButton, withCurrentUser, withMutation(addOptions), withMutation(removeOptions), withMessages);
63+
registerComponent({ name: 'NewsletterButton', component: NewsletterButton, hocs: [withCurrentUser, withMutation(addOptions), withMutation(removeOptions), withMessages] });

packages/example-forum/lib/components/common/SearchForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ SearchForm.contextTypes = {
7878
intl: intlShape
7979
};
8080

81-
registerComponent('SearchForm', SearchForm, withRouter);
81+
registerComponent({ name: 'SearchForm', component: SearchForm, hocs: [withRouter] });

packages/example-forum/lib/components/common/Vote.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ Vote.contextTypes = {
6868
intl: intlShape
6969
};
7070

71-
registerComponent('Vote', Vote, withMessages, withVote);
71+
registerComponent({ name: 'Vote', component: Vote, hocs: [withMessages, withVote] });

packages/example-forum/lib/components/posts/PostsCategories.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ const PostsCategories = ({post}) => {
1414

1515
PostsCategories.displayName = "PostsCategories";
1616

17-
registerComponent('PostsCategories', PostsCategories);
17+
registerComponent({ name: 'PostsCategories', component: PostsCategories });

packages/example-forum/lib/components/posts/PostsCommenters.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const PostsCommenters = ({post}) => {
2222

2323
PostsCommenters.displayName = "PostsCommenters";
2424

25-
registerComponent('PostsCommenters', PostsCommenters);
25+
registerComponent({ name: 'PostsCommenters', component: PostsCommenters });

packages/example-forum/lib/components/posts/PostsCommentsThread.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ const options = {
5252
limit: 0,
5353
};
5454

55-
registerComponent('PostsCommentsThread', PostsCommentsThread, [withList, options], withCurrentUser);
55+
registerComponent({ name: 'PostsCommentsThread', component: PostsCommentsThread, hocs: [[withList, options], withCurrentUser] });

packages/example-forum/lib/components/posts/PostsDaily.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ const PostsDaily = props => {
1919

2020
PostsDaily.displayName = 'PostsDaily';
2121

22-
registerComponent('PostsDaily', PostsDaily);
22+
registerComponent({ name: 'PostsDaily', component: PostsDaily });

packages/example-forum/lib/components/posts/PostsDailyList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ const options = {
116116
limit: 0,
117117
};
118118

119-
registerComponent('PostsDailyList', PostsDailyList, withCurrentUser, [withList, options]);
119+
registerComponent({ name: 'PostsDailyList', component: PostsDailyList, hocs: [withCurrentUser, [withList, options]] });

packages/example-forum/lib/components/posts/PostsDay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ PostsDay.propTypes = {
2929
number: PropTypes.number
3030
};
3131

32-
registerComponent('PostsDay', PostsDay);
32+
registerComponent({ name: 'PostsDay', component: PostsDay });

packages/example-forum/lib/components/posts/PostsEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ PostsEditForm.contextTypes = {
6161
intl: intlShape
6262
}
6363

64-
registerComponent('PostsEditForm', PostsEditForm, withMessages, withRouter, withCurrentUser);
64+
registerComponent({ name: 'PostsEditForm', component: PostsEditForm, hocs: [withMessages, withRouter, withCurrentUser] });

packages/example-forum/lib/components/posts/PostsHome.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ const PostsHome = (props, context) => {
99

1010
PostsHome.displayName = "PostsHome";
1111

12-
registerComponent('PostsHome', PostsHome);
12+
registerComponent({ name: 'PostsHome', component: PostsHome });

packages/example-forum/lib/components/posts/PostsItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ PostsItem.propTypes = {
8181
terms: PropTypes.object,
8282
};
8383

84-
registerComponent('PostsItem', PostsItem);
84+
registerComponent({ name: 'PostsItem', component: PostsItem });

packages/example-forum/lib/components/posts/PostsList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ const options = {
7777
fragmentName: 'PostsList',
7878
};
7979

80-
registerComponent('PostsList', PostsList, withCurrentUser, [withList, options]);
80+
registerComponent({ name: 'PostsList', component: PostsList, hocs: [withCurrentUser, [withList, options]] });

packages/example-forum/lib/components/posts/PostsListHeader.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ const PostsListHeader = () => {
1818

1919
PostsListHeader.displayName = "PostsListHeader";
2020

21-
registerComponent('PostsListHeader', PostsListHeader);
21+
registerComponent({ name: 'PostsListHeader', component: PostsListHeader });

packages/example-forum/lib/components/posts/PostsLoadMore.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ const PostsLoadMore = ({loading, loadMore, count, totalCount}) => {
1818

1919
PostsLoadMore.displayName = "PostsLoadMore";
2020

21-
registerComponent('PostsLoadMore', PostsLoadMore);
21+
registerComponent({ name: 'PostsLoadMore', component: PostsLoadMore });

packages/example-forum/lib/components/posts/PostsLoading.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const PostsLoading = props => {
77

88
PostsLoading.displayName = "PostsLoading";
99

10-
registerComponent('PostsLoading', PostsLoading);
10+
registerComponent({ name: 'PostsLoading', component: PostsLoading });

packages/example-forum/lib/components/posts/PostsNewButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ PostsNewButton.contextTypes = {
2525
intl: intlShape
2626
};
2727

28-
registerComponent('PostsNewButton', PostsNewButton, withCurrentUser);
28+
registerComponent({ name: 'PostsNewButton', component: PostsNewButton, hocs: [withCurrentUser] });

packages/example-forum/lib/components/posts/PostsNewForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ const options = {
6464
pollInterval: 0,
6565
};
6666

67-
registerComponent('PostsNewForm', PostsNewForm, withRouter, withMessages, [withList, options]);
67+
registerComponent({ name: 'PostsNewForm', component: PostsNewForm, hocs: [withRouter, withMessages, [withList, options]] });

packages/example-forum/lib/components/posts/PostsNoMore.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ const PostsNoMore = props => <p className="posts-no-more"><FormattedMessage id="
66

77
PostsNoMore.displayName = "PostsNoMore";
88

9-
registerComponent('PostsNoMore', PostsNoMore);
9+
registerComponent({ name: 'PostsNoMore', component: PostsNoMore });

packages/example-forum/lib/components/posts/PostsNoResults.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ const PostsNoResults = props => <p className="posts-no-results"><FormattedMessag
66

77
PostsNoResults.displayName = "PostsNoResults";
88

9-
registerComponent('PostsNoResults', PostsNoResults);
9+
registerComponent({ name: 'PostsNoResults', component: PostsNoResults });

packages/example-forum/lib/components/posts/PostsSingle.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const PostsSingle = (props, context) => {
77

88
PostsSingle.displayName = "PostsSingle";
99

10-
registerComponent('PostsSingle', PostsSingle);
10+
registerComponent({ name: 'PostsSingle', component: PostsSingle });

packages/example-forum/lib/components/posts/PostsStats.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ const PostsStats = ({post}) => {
1515

1616
PostsStats.displayName = "PostsStats";
1717

18-
registerComponent('PostsStats', PostsStats);
18+
registerComponent({ name: 'PostsStats', component: PostsStats });

packages/example-forum/lib/components/posts/PostsThumbnail.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ const PostsThumbnail = ({post}) =>
99

1010
PostsThumbnail.displayName = "PostsThumbnail";
1111

12-
registerComponent('PostsThumbnail', PostsThumbnail);
12+
registerComponent({ name: 'PostsThumbnail', component: PostsThumbnail });

packages/example-forum/lib/components/posts/PostsViews.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ PostsViews.contextTypes = {
5151

5252
PostsViews.displayName = 'PostsViews';
5353

54-
registerComponent('PostsViews', PostsViews, withCurrentUser, withRouter);
54+
registerComponent({ name: 'PostsViews', component: PostsViews, hocs: [withCurrentUser, withRouter] });

packages/example-forum/lib/components/users/UsersAccount.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ UsersAccount.propTypes = {
1414

1515
UsersAccount.displayName = 'UsersAccount';
1616

17-
registerComponent('UsersAccount', UsersAccount, withCurrentUser);
17+
registerComponent({ name: 'UsersAccount', component: UsersAccount, hocs: [withCurrentUser] });

packages/example-forum/lib/components/users/UsersAccountMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const UsersAccountMenu = ({ state }) => (
2222

2323
UsersAccountMenu.displayName = 'UsersAccountMenu';
2424

25-
registerComponent('UsersAccountMenu', UsersAccountMenu);
25+
registerComponent({ name: 'UsersAccountMenu', component: UsersAccountMenu });

packages/example-forum/lib/components/users/UsersAvatar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ UsersAvatar.defaultProps = {
4040

4141
UsersAvatar.displayName = 'UsersAvatar';
4242

43-
registerComponent('UsersAvatar', UsersAvatar);
43+
registerComponent({ name: 'UsersAvatar', component: UsersAvatar });

packages/example-forum/lib/components/users/UsersEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ UsersEditForm.contextTypes = {
4545

4646
UsersEditForm.displayName = 'UsersEditForm';
4747

48-
registerComponent('UsersEditForm', UsersEditForm, withMessages, withCurrentUser);
48+
registerComponent({ name: 'UsersEditForm', component: UsersEditForm, hocs: [withMessages, withCurrentUser] });

packages/example-forum/lib/components/users/UsersMenu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ UsersMenu.propsTypes = {
5858
client: PropTypes.object,
5959
};
6060

61-
registerComponent('UsersMenu', UsersMenu, withCurrentUser, withApollo);
61+
registerComponent({ name: 'UsersMenu', component: UsersMenu, hocs: [withCurrentUser, withApollo] });

packages/example-forum/lib/components/users/UsersName.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ UsersName.propTypes = {
1212

1313
UsersName.displayName = 'UsersName';
1414

15-
registerComponent('UsersName', UsersName);
15+
registerComponent({ name: 'UsersName', component: UsersName });

packages/example-forum/lib/components/users/UsersProfile.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ const options = {
5151
fragmentName: 'UsersProfile',
5252
};
5353

54-
registerComponent('UsersProfile', UsersProfile, withCurrentUser, [withDocument, options]);
54+
registerComponent({ name: 'UsersProfile', component: UsersProfile, hocs: [withCurrentUser, [withDocument, options]] });

packages/example-forum/lib/components/users/UsersProfileCheck.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ const options = {
7979
fragment: mustCompleteFragment,
8080
};
8181

82-
registerComponent('UsersProfileCheck', UsersProfileCheck, withMessages, [withDocument, options]);
82+
registerComponent({ name: 'UsersProfileCheck', component: UsersProfileCheck, hocs: [withMessages, [withDocument, options]] });

packages/example-forum/lib/components/users/UsersSingle.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const UsersSingle = (props, context) => {
77

88
UsersSingle.displayName = "UsersSingle";
99

10-
registerComponent('UsersSingle', UsersSingle);
10+
registerComponent({ name: 'UsersSingle', component: UsersSingle });

packages/example-instagram/lib/components/comments/CommentsEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ const CommentsEditForm = ({documentId, closeModal}) =>
3232
}}
3333
/>
3434

35-
registerComponent('CommentsEditForm', CommentsEditForm);
35+
registerComponent({ name: 'CommentsEditForm', component: CommentsEditForm });

packages/example-instagram/lib/components/comments/CommentsItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ const CommentsItem = ({comment, currentUser}) =>
3131

3232
</div>
3333

34-
registerComponent('CommentsItem', CommentsItem);
34+
registerComponent({ name: 'CommentsItem', component: CommentsItem });

packages/example-instagram/lib/components/comments/CommentsList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const options = {
3333
fragmentName: 'CommentsItemFragment',
3434
};
3535

36-
registerComponent('CommentsList', CommentsList, withCurrentUser, [withList, options]);
36+
registerComponent({ name: 'CommentsList', component: CommentsList, hocs: [withCurrentUser, [withList, options]] });

packages/example-instagram/lib/components/comments/CommentsNewForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ const CommentsNewForm = ({picId}) =>
2626

2727
</div>
2828

29-
registerComponent('CommentsNewForm', CommentsNewForm);
29+
registerComponent({ name: 'CommentsNewForm', component: CommentsNewForm });

packages/example-instagram/lib/components/common/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ const Header = ({currentUser}) =>
7171

7272
</div>
7373

74-
registerComponent('Header', Header, withCurrentUser);
74+
registerComponent({ name: 'Header', component: Header, hocs: [withCurrentUser] });

packages/example-instagram/lib/components/pics/PicsDetails.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ const options = {
6565
fragmentName: 'PicsDetailsFragment',
6666
};
6767

68-
registerComponent('PicsDetails', PicsDetails, [withDocument, options]);
68+
registerComponent({ name: 'PicsDetails', component: PicsDetails, hocs: [[withDocument, options]] });

packages/example-instagram/lib/components/pics/PicsEditForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ const PicsEditForm = ({documentId, closeModal}) =>
2121
}}
2222
/>
2323

24-
registerComponent('PicsEditForm', PicsEditForm);
24+
registerComponent({ name: 'PicsEditForm', component: PicsEditForm });

packages/example-instagram/lib/components/pics/PicsItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ const PicsItem = ({pic, currentUser}) =>
2525

2626
</div>
2727

28-
registerComponent('PicsItem', PicsItem);
28+
registerComponent({ name: 'PicsItem', component: PicsItem });

packages/example-instagram/lib/components/pics/PicsList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const options = {
3333
limit: 6
3434
};
3535

36-
registerComponent('PicsList', PicsList, withCurrentUser, [withList, options]);
36+
registerComponent({ name: 'PicsList', component: PicsList, hocs: [withCurrentUser, [withList, options]] });

0 commit comments

Comments
 (0)