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

Commit 931c205

Browse files
author
Jeremy Wiebe
committed
More clarification on constants
1 parent 5ccdb96 commit 931c205

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

es6/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,14 @@ class DatePicker {
9494
All other symbols (methods, variables, constants within a method) should be `camelCased`!
9595

9696
```javascript
97-
// GOOD
97+
// GOOD - importing a function
9898
import {addToCart} from './actions'
9999
100+
// GOOD - exporting a function
101+
export const receiveProductData = createAction('Receive Product Data')
102+
100103
class MyClass {
104+
// GOOD - local constant within class
101105
const name = 'Button'
102106
render() { ... }
103107
}

0 commit comments

Comments
 (0)