Layout Factory

Learn how to implement the product layout using the layoutFactory() function.

We'll cover the following

Currently, the ProductLayout component imports the useProductLayout function and the LAYOUTS object from layout/composables/useProductLayout. However, because we want to decouple it, the layout state must be consumed differently. Instead, the ProductLayout component can receive the useLayout function through props. Below we can see what the ProductLayout script content will look like when we’re done:

Get hands-on with 1400+ tech skills courses.