Extract a RedwoodJS Layout Component

Share this video with your friends

Send Tweet

RedwoodJS gives us a cli command to generate layouts.

yarn redwood generate layout main

This will generate a MainLayout component in src/layouts/MainLayout/. We can use this layout component to define any headers or footers we want to share across multiple pages.