Get Started
components/pies/saga-slice.js
1
import { crudSlice } from 'saga-slice-helpers';
2
​
3
const sagaSlice = crudSlice({
4
name: 'pies'
5
});
6
​
7
export const { actions } = sagaSlice;
8
export default sagaSlice;
Copied!
components/pies/Form.jsx
1
import { actions } from './saga-slice';
2
​
3
export default connect(
4
null,
5
actions
6
)((props) => {
7
8
const onSubmit = (values) => props.create(values)
9
10
return (
11
<Form onSubmit={ onSubmit }>
12
...
13
</Form>
14
);
15
})
Copied!
​
Last modified 1yr ago
Copy link