bamlab / bamlab/react-native-formik
Confused by formatting inputs example on home page
Open
- Dominant language
- JavaScript
- Stars
- 398
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
In this example [Formatting Inputs](https://github.com/bamlab/react-native-formik#formatting-inputs) I'm confused by this line:
```const formatPhoneNumber: string => string = (unformattedPhoneNumber) => ...;```
Why the double function indirection? How exactly is that adding spaces? I'm guessing it's just a sample to say that if "value" prop is a function, it'll get called but store the value untransformed.
Would love some hints.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.