Closed leonvisscher closed 6 years ago
Hey @leon0v. Thanks for trying things out!
I thought this PWA should be completely headless and all communication should go through the API.
That's currently not the goal for this project. It will be entirely possible for community libraries to make PWA Studio into a headless solution, but the current plans for it OOTB will server render the application shell from the Magento 2 PHP app.
The Magento application is currently necessary for the following bits of functionality:
<head />
of the document for each pageRootComponent
to an entity or group of entities, without requiring a deploymentWhat is meant by this data consumption.
In a typical React application, a route pattern is married to 1 component. So you could say the /products
route links to the Product.js
component. However, this doesn't scale well for Magento's use-cases. You may want to have 15 different types of product pages that will be used for different types of products. In fact, you may want a specific SKU to use a certain type of product page, but only between a defined date/time range.
The manifest of all RootComponent
implementations is provided to the backend so that a store owner can make these types of decisions and schedules without requiring a full deployment. Each individual RootComponent
is compiled into its own optimized bundle that the client-side can load when needed.
Topic content revised in #38
See: https://magento-research.github.io/pwa-devdocs/venia-pwa-concept/
@DrewML @jcalcaben Thanks for explaining and updating the docs.
This issue is a:
[ ] Bug [ ] New Topic Request [ X ] Topic Clarification Request [ ] New Feature Request [ ] Other
Description:
I've got the Venia theme up and running locally. I've implemented some Redux functionality making requests to the GraphQL API. Everything is working fine, but I don't really understand the purpose of the module shipped with the Venia theme. I thought this PWA should be completely headless and all communication should go through the API.
There is also reference in the MagentoRootComponentsPlugin to 'the Magento backend':
What is meant by this data consumption.
I am a front-end developer who is quiet new to Magento so that may be a reason that I don't directly see purpose for this module.
Expected Result:
I will understand the purpose of these aspects of PWA studio.