Layouts
Layouts are collection of blocks that create a page - for example your home page. You can develop blocks in a layout
context using the Tapcart CLI. You can spin up the layout development server with the following command:
yarn tapcart layout dev
yarn tapcart layout dev -s home #layout types are documented in the CLI help menu
yarn tapcart layout dev home -b HelloWorld # Spins up the home layout development server using local HelloWorld block
yarn tapcart layout dev home --all # Spins up the home layout development server using all local blocks
By default, the dev server will render the layout with the server version of blocks. If you want to use the local versions,
you can pass the --all|-a
flag to override all blocks, or --block=BlockFolder
to override a specific block
NoteWhile the development server for blocks supports hot reloading, the layout dev server does not support hot reloading of individual blocks.
Updated 10 days ago