How to generate new component

I can create a new page with all the auto-generated components
eg:

 √ Successfully wrote file `./web/src/components/Post/EditPostCell/EditPostCell.js`
     √ Successfully wrote file `./web/src/components/Post/Post/Post.js`
     √ Successfully wrote file `./web/src/components/Post/PostCell/PostCell.js`
     √ Successfully wrote file `./web/src/components/Post/PostForm/PostForm.js`
     √ Successfully wrote file `./web/src/components/Post/Posts/Posts.js`
     √ Successfully wrote file `./web/src/components/Post/PostsCell/PostsCell.js`
     √ Successfully wrote file `./web/src/components/Post/NewPost/NewPost.js`

Because I want to create a new page but not based on a model in the db

yarn rw g page MyNewPageName

Other similar generators you can use: https://redwoodjs.com/docs/cli-commands#generate-alias-g

1 Like

this looks like scaffolding… i think what you looking for is the:

yarn rw generate page <page_name>
2 Likes