Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Commit 3811d82

Browse files
fix(rn_camera): improve naming
1 parent 45cc8f2 commit 3811d82

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Diff for: docs/RNCamera.md

-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ class App extends Component {
106106
return (
107107
<View style={styles.container}>
108108
<RNCamera
109-
ref={ref => {
110-
this.camera = ref;
111-
}}
112109
style={styles.preview}
113110
type={RNCamera.Constants.Type.back}
114111
flashMode={RNCamera.Constants.FlashMode.on}

Diff for: src/RNCamera.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ export default class Camera extends React.Component<PropsType, StateType> {
321321
return isAuthorized ? 'READY' : isAuthorizationChecked ? 'PENDING_AUTHORIZATION' : 'NOT_AUTHORIZED';
322322
}
323323

324-
// CAF = Children as Function;
325-
hasCAF = (): * => typeof this.props.children === 'function';
324+
// FaCC = Function as Child Component;
325+
hasFaCC = (): * => typeof this.props.children === 'function';
326326

327327
renderChildren = (): * => {
328-
if (this.hasCAF()) {
328+
if (this.hasFaCC()) {
329329
return this.props.children({ camera: this, status: this.getStatus() })
330330
}
331331
return null;
@@ -334,7 +334,7 @@ export default class Camera extends React.Component<PropsType, StateType> {
334334
render() {
335335
const nativeProps = this._convertNativeProps(this.props);
336336

337-
if (this.state.isAuthorized || this.hasCAF()) {
337+
if (this.state.isAuthorized || this.hasFaCC()) {
338338
return (
339339
<RNCamera
340340
{...nativeProps}

0 commit comments

Comments
 (0)