An open API service indexing awesome lists of open source software.

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.

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)``;
```