Fix Lab SCA1 scaffold details that no longer match the SPFx generator - #1003
Open
Elliot Margot (OwnOptic) wants to merge 1 commit into
Open
Fix Lab SCA1 scaffold details that no longer match the SPFx generator#1003Elliot Margot (OwnOptic) wants to merge 1 commit into
Elliot Margot (OwnOptic) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lab SCA1 tells you to scaffold with
yo @microsoft/sharepoint@next. Three details in the lab describe output that tag no longer produces, checked against@microsoft/generator-sharepoint@1.24.0-beta.3.React 17 -> React 18. The Exercise 2 note says the React template wires up React 17. The generator's
copilotComponentReactdependency group pinsreactandreact-domat18.3.1and@types/reactat18.2.79.The
render()snippet in Exercise 3 is a React 17 mount. The scaffolded component importscreateRootfromreact-dom/client, keeps the root on the class soonTeardown()can unmount it, and passesonRequestDisplayModeandonRequestSizeChangedown to the React component. The snippet showedReactDOM.render(...)and neither callback, so it did not match the file the reader has just been told to open. Replaced with the scaffolded code, and the sentence above it now mentions the callbacks and the root.IHelloWorldLabPropsin Exercise 4 does not exist. The generator emitsI<componentName>Props, so with the lab's component name it isIHelloWorldProps. The snippet as written does not compile.Verified by running
npm pack @microsoft/generator-sharepoint@nextand readinglib/common/dependencies.jsonandlib/templates/copilotComponent/react/. Docs only, one file.