React new typescript component file template code generator.
pnpm add -g sakina-react
such as project files tree:
└─ project
└─ src
└─ components # (in this dir exec command)
in project/src/components
exec:
sr gs AnimeList
then generate a simple react component file:
└─ project
└─ src
└─ components
└─ AnimeList.tsx
// AnimeList.tsx
import React from 'react'
export interface IAnimeListProps {}
export const AnimeList: React.FC<IAnimeListProps> = (props) => {
return (
<div>content</div>
)
}
such as:
sr g AnimeList
then generate a component with style file:
└─ project
└─ src
└─ components
└─ AnimeList
├─ index.tsx
└─ index.module.scss
MIT