From 83092f0b7f5418c4da68dc3c8db5db138f58e77d Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Thu, 21 Sep 2023 11:12:36 +0000 Subject: [PATCH] chore: favors automatic runtime instead of classic runtime --- apps/public-docsite-v9/src/Concepts/Slots/Slots.stories.mdx | 6 ++---- .../files/component/render__componentName__.tsx__tmpl__ | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/public-docsite-v9/src/Concepts/Slots/Slots.stories.mdx b/apps/public-docsite-v9/src/Concepts/Slots/Slots.stories.mdx index d762e9f9d609b4..da56b8f2d12082 100644 --- a/apps/public-docsite-v9/src/Concepts/Slots/Slots.stories.mdx +++ b/apps/public-docsite-v9/src/Concepts/Slots/Slots.stories.mdx @@ -381,11 +381,9 @@ Both `slot.always` and `slot.optional` methods will create a slot definition tha - `renderButton` takes in `ButtonState` and renders content. ```tsx -/** @jsxRuntime classic */ -/** @jsx createElement */ +/** @jsxRuntime automatic */ +/** @jsxImportSource @fluentui/react-jsx-runtime */ -// createElement custom JSX pragma is required to support slot creation -import { createElement } from '@fluentui/react-jsx-runtime'; import { assertSlots } from '@fluentui/react-utilities'; const renderButton_unstable = (state: ButtonState) => { diff --git a/tools/workspace-plugin/src/generators/react-component/files/component/render__componentName__.tsx__tmpl__ b/tools/workspace-plugin/src/generators/react-component/files/component/render__componentName__.tsx__tmpl__ index 99e51adc1ecfb2..39fbfc9def7fa9 100644 --- a/tools/workspace-plugin/src/generators/react-component/files/component/render__componentName__.tsx__tmpl__ +++ b/tools/workspace-plugin/src/generators/react-component/files/component/render__componentName__.tsx__tmpl__ @@ -1,7 +1,6 @@ -/** @jsxRuntime classic */ -/** @jsx createElement */ +/** @jsxRuntime automatic */ +/** @jsxImportSource @fluentui/react-jsx-runtime */ -import { createElement } from '@fluentui/react-jsx-runtime'; import { assertSlots } from '@fluentui/react-utilities'; import type { <%= componentName %>State, <%= componentName %>Slots } from './<%= componentName %>.types';