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
λ pages/example.tsx
λ ...
λ printer page multi/folder/example
λ This command then creates
λ pages/multi/folder/example.tsx

This then generates in the file pages/example.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 example pages/example
λ ...
λ This command then injects redux state into
λ pages/example.tsx

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