Reach UI is an accessible foundation for React applications and design systems.
The three equally important goals are to be:
- Accessible
- Composable
- Stylable
export class UserList extends React.Component { | |
state = { count: 0 }; | |
handleClick = (item) => { | |
setTimeout(() => { | |
console.log(`You clicked ${this.props.group} ${this.state.count} times`); | |
}, 3000); | |
}; | |
render() { |
#!/usr/local/bin/node | |
/* | |
* Usage: in-place deletion of duplicate files within a folder. | |
* ``` | |
* ./deleteDuplicates.js relative/folder/path/of/duplicate/files | |
* ``` | |
* | |
* You may need to change the access control to run this as an executable. | |
* ``` |
I've been using controlled components for near everything in my application as that has been the recommended way to go, and I subscribe to the idea that React should be in control of this state when possible.
However, I recently went through @ryanflorence's Advanced React course—which is a wonderful collection and breakdown of some powerful (and still uncommon) patterns available in React—and the last lecture is on controlled components.
At around 17:40 in the lecture video, Ryan does something very interesting. He writes some code that looks like this:
<Tabs
defaultActiveIndex={this.state.currentTab}
onChange={(index) => {
const rawCategories = { | |
'hierarchical_categories.level_1': { | |
'Beverages': 349, | |
'Coffee & Tea': 4, | |
'Deli': 35 | |
}, | |
'hierarchical_categories.level_2': { | |
'Beverages > Energy & Sports Drinks': 54, | |
'Beverages > Juice & Nectars': 111, | |
'Deli > Cheeses': 30 |
import React, { Component } from 'react' | |
import api from './api' | |
class App extends Component { | |
constructor () { | |
super() | |
this.state = { | |
name: null, | |
imgUrl: null | |
} |
import React, { Component } from 'react'; | |
class App extends Component { | |
constructor () { | |
super() | |
this.state = { | |
name: null, | |
imgUrl: null | |
} | |
} |
Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react
Granted this is a contrived example, but it's still something I took notice to: in those "Advanced React" videos I've been watching, Ryan Florence codes very slowly, and does not make one quick change and jump back to the browser to see what changed.
He stops and thinks. He asks himself (or the viewer) questions. He wonders what
There are a myriad of benefits of smaller PRs with smaller line change deltas:
One pitfall to small PRs is people feeling like they can't move ahead or build on top of code that is up for review.
Status | Type | Env Vars Change | Review App | Ticket |
---|---|---|---|---|
Ready/Hold | Feature/Bug/Tooling/Refactor/Hotfix | Yes/No | Link | Link |
⚠️ NOTE: use notes like this to emphasize something about the PR. This could include other PRs this PR is built on top of; new or removed environment variables; reasons for why the PR is on hold; or anything else you would like to draw attention to.
What problem are you trying to solve?