https://github.com/splittydev/sfc
Rust CLI for scaffolding React SFCs.
https://github.com/splittydev/sfc
Last synced: 8 months ago
JSON representation
Rust CLI for scaffolding React SFCs.
- Host: GitHub
- URL: https://github.com/splittydev/sfc
- Owner: SplittyDev
- Created: 2020-01-28T10:21:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T10:32:33.000Z (about 6 years ago)
- Last Synced: 2025-07-04T14:18:12.700Z (8 months ago)
- Language: Rust
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stateless-function-component
> Easy scaffolding of stateless function components.
Supported:
- [x] Plain SFC
- [x] `--styled`: Styled Components
- [x] `--routed`: React Router
- [x] `--feather`: Feather Icons
- [x] `--children`: Nested Components
All options can be mixed and combined.
Usage:
```bash
# show all options
sfc --help
# scaffold styled sfc with routing
sfc --styled --routed
```
Example output for `sfc --styled --routed`:
```jsx
import React from 'react';
import styled from 'styled-components';
import {
Link,
Switch,
useRouteMatch,
} from 'react-router-dom';
const MyComponent = ({className}) => {
const {path} = useRouteMatch();
return (
);
};
export default styled(MyComponent)``;
```