Printer Logo

Printer

Creating Pages

The Page command creates a new Page Component in a similar way that the Component command does. You can inject slices into pages just like you would a component.

λ Usage
λ printer page [path]
λ Example Usage
λ printer page example
λ This command then creates
λ app/example/page.tsx
λ ...
λ printer page multi/folder/example
λ This command then creates
λ app/multi/folder/example/page.tsx

This then generates in the file app/example/page.tsx the following code.

Now let's say you want to inject a slice into a page. You can run the inject command on a page just like you would a component.

λ printer inject counter app/example/page
λ ...
λ This command then injects redux state into
λ app/example/page.tsx

This then updates the file in app/example/page.tsx with the following code.