Skip to content

Commit 3e93dcf

Browse files
committed
2 parents 85f2b52 + d0a0a11 commit 3e93dcf

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
If you want to help out with improving form-and-function then first, thank you very much!
2+
3+
At the moment the folder structure is a little odd, because this project started out as a create-react-app project, and that is
4+
still in place for the demos. I'm somewhat fond of keeping the demos in the same repo because then any API breaking changes
5+
are very obvious, but if there is a compelling reason to change then let's talk. The upshot of this is that the library code
6+
lives in the `src/lib` folder.
7+
8+
There are a couple of useful scripts in the `package.json`:
9+
10+
* `start` - starts the demo locally
11+
* `build` - builds the library
12+
13+
The build process currently uses the Typescript compiler to get down to ES5 and emit declarations, but keep things in modules,
14+
then rollup to create bundles from these modules. Probably a bit hacky, and something that needs improving but it works for now.
15+
16+
There is no tolerance of any anti-social behaviour of any form amongst anyone contributing to this project. And I decide what
17+
anti-social means. Just be nice.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ Of course, we want to give feedback to our users on both fields. We can do this
433433
434434
#### Writing Your Own Validators
435435
436-
Although the provided validators cover a lot of sitations, undoubtedly at some point you will need to create your own. This is relatively simple. Validators must match the signature:
436+
Although the provided validators cover a lot of situations, undoubtedly at some point you will need to create your own. This is relatively simple. Validators must match the signature:
437437
438438
```js
439439
interface ValidResult {
@@ -558,7 +558,7 @@ If, as above, we name our messages using the same keys as the form validation me
558558
559559
## State Management
560560
561-
One of the design goals was to create a library that was agnostic to the variety of state management used. I'm not certain that this is an easy target, or one that is achieved entirely, but the current attempt uses a prop on the `Form` component: `stateEngine`. This is an optional prop, and if not passed then `form-and-function` will create its own state engine that uses the internal state of the `Form` component. If supplied, this prop should be an object that fulfils the following interface:
561+
One of the design goals was to create a library that was agnostic to the variety of state management used. I'm not certain that this is an easy target, or one that is achieved entirely, but the current attempt uses a prop on the `Form` component: `stateEngine`. This is an optional prop, and if not passed then `form-and-function` will create its own state engine that uses the internal state of the `Form` component. If supplied, this prop should be an object that fulfills the following interface:
562562

563563
```js
564564
export interface StateEngine<T extends object> {

0 commit comments

Comments
 (0)