Skip to content

Commit

Permalink
include note on HTML5 custom elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole Levy committed Apr 4, 2018
1 parent da8a413 commit 9f735c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions packages/react-dom/src/__tests__/ReactDOMComponent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@ describe('ReactDOMComponent', () => {
}).toWarnDev(
'<BR /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',

This comment has been minimized.

Copy link
@DaJoker78

DaJoker78 Apr 4, 2018

Hi am sorry

);
expect(returnedValue).not.toContain('</BR>');
});
Expand All @@ -1019,7 +1020,8 @@ describe('ReactDOMComponent', () => {
).toWarnDev(
'<IMG /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
);
});

Expand Down Expand Up @@ -1069,7 +1071,8 @@ describe('ReactDOMComponent', () => {
).toWarnDev([
'<hasOwnProperty /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
'The tag <hasOwnProperty> is unrecognized in this browser',
]);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,13 @@ describe('ReactDOMServer', () => {
).toWarnDev([
'Warning: <inPUT /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
// linearGradient doesn't warn
'Warning: <iFrame /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
]);
});

Expand Down
3 changes: 2 additions & 1 deletion packages/react-dom/src/client/ReactDOMFiberComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ export function createElement(
isCustomComponentTag || type === type.toLowerCase(),
'<%s /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
type,
);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/react-dom/src/server/ReactPartialRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,8 @@ class ReactDOMServerRenderer {
tag === element.type,
'<%s /> is using incorrect casing. ' +
'Use PascalCase for React components, ' +
'or lowercase letters and dashes for HTML.',
'or lowercase letters and dashes for HTML ' +
'and HTML5 custom elements',
element.type,
);
}
Expand Down

0 comments on commit 9f735c7

Please sign in to comment.