-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] add static route tutorial #2249
[Doc] add static route tutorial #2249
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thanks for doing this!
const Foo = () => { | ||
|
||
useEffect(() => { | ||
document.title = 'Foo Test Page'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a simple example for a tutorial but Venia uses react-head
to things like this. Here's an example: https://github.com/magento/pwa-studio/blob/develop/packages/venia-ui/lib/components/CartPage/cartPage.js#L59.
Not sure if you really want to get into that here though, I might just drop the manipulation of title
in this file.
pwa-devdocs/src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
Outdated
Show resolved
Hide resolved
pwa-devdocs/src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
Outdated
Show resolved
Hide resolved
pwa-devdocs/src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
Outdated
Show resolved
Hide resolved
pwa-devdocs/src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
Outdated
Show resolved
Hide resolved
+ const CartPage = lazy(() => import('../CartPage')); | ||
+ const CheckoutPage = lazy(() => import('../CheckoutPage')); | ||
+ const CreateAccountPage = lazy(() => import('../CreateAccountPage')); | ||
+ const Search = lazy(() => import('../../RootComponents/Search')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What actually changed with these lazy imports? Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops I forgot to actually update it 😅
pwa-devdocs/src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
Outdated
Show resolved
Hide resolved
+ import Main from '@magento/venia-ui/lib/components/Main'; | ||
+ import Mask from '@magento/venia-ui/lib/components/Mask'; | ||
+ import MiniCart from '@magento/venia-ui/lib/components/MiniCart'; | ||
+ import Navigation from '@magento/venia-ui/lib/components/Navigation'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought as I read all of these: should we be doing this in Venia already?
Co-Authored-By: Andy Terranova <13182778+supernova-at@users.noreply.github.com>
Description
Revise and publish a tutorial for adding a new static route based on the intial content contributed by @rossmc
Related Issue
Closes PWA-301
Acceptance
Any developer
Verification Stakeholders
Any develop
Specification
Verification Steps
pwa-docs
directorynpm run lint src/tutorials/pwa-studio-fundamentals/add-a-static-route/index.md
npm run develop
Screenshots / Screen Captures (if appropriate)
Checklist