Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
This proposal is not longer active. Context: https://twitter.com/siddharthkp/status/909818777314902016
Ever wonder why a particular website is showing a development build icon for React DevTools? Here's how you can find out!
First copy/paste this well-annotated DevTools build-type-checker function into your browser console so you can run it.
Next, execute the following line in your developer console:
console.log(__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers);
If React is present on the page, you'll see something like:
// Imagine what would it be if connect, withRouter, injectIntl were child as function | |
export default ( | |
<Connect mapStateToProps={mapStateToProps} mapPropsToActions={actions}> | |
{ | |
(props) => ( | |
<WithRouter> | |
{ | |
(router) => ( | |
<InjectIntl> | |
{(intl => <SomeComonent intl={intl} router={router} {...props} />} |
Go here, select "View Bug Reporter", login, select "New", select "Bug Reporter".
UI/Usability
Always
App Store Review Guidelines should use different language when discouraging unqualified submissions to the app store
Cheng Lou, a former member of the React team, gave an incredible talk at React Europe 2016 entitled "On the Spectrum of Abstraction". That talk is available for viewing here: https://www.youtube.com/watch?v=mVVNJKv9esE
It's only a half-hour, but it is mind-blowing. It's worth re-watching two or three times, to let the ideas sink in.
I just rewatched the talk for some research, and wrote down a summary that's semi-transcript-ish. I didn't see any other transcripts for this talk, other than the auto-generated closed captions, so I wanted to share for reference.
import styled from ‘styled-components’; | |
const Score = styled.div` | |
/* some styles here … */ | |
font-size: ${props => props.length <= 2 ? 62 : 45}px; | |
`; |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
// While I claim this is a drop-in replacement, it is a little bit slower. | |
// If you have hundreds of links, you might spend a few more milliseconds rendering the page on transitions. | |
// KNOWN ISSUES WITH THIS APPROACH: | |
// * This doesn't work great if you animate route changes with <TransitionGroup> | |
// because the links are going to get updated immediately during the animation. | |
// * This might still not update the <Link> correctly for async routes, | |
// as explained in https://github.com/reactjs/react-router/issues/470#issuecomment-217010985. |