main
jsx 29 lines 1.1 KB
Raw
1 import {Throw} from 'shared-runtime';
2
3 /**
4 * Note: this is disabled in the evaluator due to different devmode errors.
5 * Found differences in evaluator results
6 * Non-forget (expected):
7 * (kind: ok) <invalidtag val="[object Object]"></invalidtag>
8 * logs: ['Warning: <%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.%s','invalidTag']
9 *
10 * Forget:
11 * (kind: ok) <invalidtag val="[object Object]"></invalidtag>
12 * logs: [
13 * 'Warning: <%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.%s','invalidTag',
14 * 'Warning: The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.%s','invalidTag',
15 * ]
16 */
17 function useFoo() {
18 const invalidTag = Throw;
19 /**
20 * Need to be careful to not parse `invalidTag` as a localVar (i.e. render
21 * Throw). Note that the jsx transform turns this into a string tag:
22 * `jsx("invalidTag"...
23 */
24 return <invalidTag val={{val: 2}} />;
25 }
26 export const FIXTURE_ENTRYPOINT = {
27 fn: useFoo,
28 params: [],
29 };