fix: updated components to use single quotes in jsx #383
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Osprey
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
resilience
Tom's Wishlist
type: bug
type: discussion
type: error handling
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/spee.ch#383
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "single-quote-jsx"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per discussion in slack, we needed to decide on single or double quotes for html elements in the jsx. I like single quotes because it reminds me that it is jsx, and thus other jsx rules need to be followed (e.g. using
className
rather thanclass
). This PR finishes converting the components to use single quotes. I also moved all connected components into thecontainers
folder.I know this isn't the purpose of the PR, but you should avoid binding functions inside the render function.
https://reactjs.org/docs/handling-events.html
Also why the change to
xxx/index
? Still works the same way without it.@ -3,2 +3,4 @@
class ExpandingTextarea extends Component {
constructor (props) {
super(props);
You should bind handlers in the component constructor instead of inside the render function
@ -3,2 +3,4 @@
class ExpandingTextarea extends Component {
constructor (props) {
super(props);
The
xxx/index
was an accident; my IDE attempts to update paths when I move files between folders. I fixed the handler binding as well. Thanks!