Skip to content

Commit 5e15034

Browse files
committed
update README
1 parent 14737cb commit 5e15034

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

README.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### This POC has multiple goals:
44
1. Be able to define an algebra which will describe a subdomain of our business logic.
55
2. Provide a definition for the algebra.
6-
3. Connect algebra to a react redux application.
6+
3. Connect the algebra to a react redux application.
77

88
## 1. Defining the algebra
99
We are starting by defining a class which should describe our problem.
@@ -40,7 +40,7 @@ class CallAlgebra<Customer, Agent, Call> {
4040
}
4141
```
4242

43-
As you see we are keeping our pure and monadic, so we are able to chain our methods to build larger and more complex logic.
43+
As you see we are keeping our algebra pure and monadic, so we are able to chain our methods to build larger and more complex logic. For this example we are using funfix/effects but any IO implementation that support sync and async execution should work.
4444

4545
```typescript
4646
class CallAlgebra<Customer, Agent, Call> {
@@ -65,7 +65,7 @@ Now we have every piece to build our algebra, try play with this idea a bit and
6565

6666
## 2. Provide a definition for the algebra
6767

68-
Now that we have a ready algebra we are ready to create an implementation for it (in FP word its called interpreter)
68+
Now that we have an algebra we are ready to create an implementation for it (in FP word its called interpreter)
6969

7070
It is made of 2 sub steps. First we need to define our types for our algebras params and then we need to pass our methods implementation:
7171

@@ -148,7 +148,7 @@ const callAlgebraImplementation = new CallAlgebra<Customer, Agent, Call>(
148148
)
149149
```
150150

151-
## 3.
151+
## 3. Connect the algebra to a react redux application.
152152
Because the IO monad is lazy and referentially transparent we can store its state in redux.
153153
To make this work we need 2 reducers. One for the IO and the other one for the result of the IO.
154154

@@ -228,20 +228,24 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
228228

229229
In the project directory, you can run:
230230

231-
### `yarn start`
231+
* `yarn start`
232232

233233
Runs the app in the development mode.<br />
234234
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
235235

236236
The page will reload if you make edits.<br />
237237
You will also see any lint errors in the console.
238238

239-
### `yarn test`
239+
* `yarn mock-server`
240+
241+
Starts a mock server
242+
243+
* `yarn test`
240244

241245
Launches the test runner in the interactive watch mode.<br />
242246
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
243247

244-
### `yarn build`
248+
* `yarn build`
245249

246250
Builds the app for production to the `build` folder.<br />
247251
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -250,19 +254,3 @@ The build is minified and the filenames include the hashes.<br />
250254
Your app is ready to be deployed!
251255

252256
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
253-
254-
### `yarn eject`
255-
256-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
257-
258-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
259-
260-
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
261-
262-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
263-
264-
## Learn More
265-
266-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
267-
268-
To learn React, check out the [React documentation](https://reactjs.org/).

0 commit comments

Comments
 (0)