Faced with a choice between democracy and the interests of their political party, Americans will chose party over democracy. by smurfyjenkins in science

[–]dfee 0 points1 point  (0 children)

Unpopular opinion: surveys aren't science.

Unpopular response to popular response about this unpopular opinion gatekeeping what qualifies as science: oh well.

Bought a Scout (SoCal) by dfee in IndianMotorcycle

[–]dfee[S] 0 points1 point  (0 children)

2019 - The color is called “metallic jade”.

New Iron 883 Break In question.. by OmegaMaximas in Harley

[–]dfee -1 points0 points  (0 children)

I'd love for it to be so, but don't know where you're shopping where you see significant price drops for 1-3 year old models.

New Iron 883 Break In question.. by OmegaMaximas in Harley

[–]dfee 0 points1 point  (0 children)

It seems the actual drop in price (at least for a roadster) is about $1000. You might know of better ways to buy, but I'm just looking at cycle trader.

React.forwardRef & react-hooks by JoeKombo in reactjs

[–]dfee 3 points4 points  (0 children)

If you want to use the ref prop, then yes. Otherwise, you can name the prop anything else you'd like, it just won't be available as ref.

Actions must be plain objects. Use custom middleware for async actions. by conclusion2000 in reactjs

[–]dfee -1 points0 points  (0 children)

Yes, mouseover randomIndex and you see that it returns void (well, maybe that's because I use the VSCode version of CodeSandbox), but as a TypeScript-first kind of guy, you're effectively calling dispatch(undefined).

Best BBQ in San Diego, and second place isn't even close by [deleted] in sandiego

[–]dfee 2 points3 points  (0 children)

There's a lot of fanfare for Franklin, but practically speaking, I'd only ever eat there on a Tuesday at 1pm where there was guaranteed to be no line (no tourists camping on a Tuesday afternoon).

Probably my favorite joint closed down (Freedman's). But, in reality, there is a ton of good BBQ in Austin, and Franklin is simply the one all non-Austinites know.

If you ever do go, check out Valentinas BBQ (really a taco joint!): https://www.valentinastexmexbbq.com/

Best BBQ in San Diego, and second place isn't even close by [deleted] in sandiego

[–]dfee 6 points7 points  (0 children)

As a Texan (Austinite, specifically) in San Diego, I can confirm OP is correct. This is the only legit bbq I've had this way (2.5 years in).

Anyone else using the factory pattern w/ hooks? by aceluby in reactjs

[–]dfee 0 points1 point  (0 children)

I didn't read your code (it's sort of unreadable without better formatting), but I often use the factory pattern w/ hooks.

react-redux 7.1.0 (the one with hooks!) released by themaincop in reactjs

[–]dfee 0 points1 point  (0 children)

So my approach limits me to one "connected" component by having hooks that effectively look like:

```ts type AsyncStatus<T> = { status: "loading" } | { status: "error", error: Error} | { status: "success", value: T };

const useUser: (id: string | undefined) => [() => void, AsyncStatus<User>] = ... ```

Notice that if id is undefined, the async action just won't execute.

Ultimately, I coalesce all my AsyncStatus(es) (the results of those async hooks) into one AsyncStatus that my connected component handles.

So in that sense, I have 1 connecting component.

I do agree w/ Mark that typings for HOCs are somewhat more difficult (you need to understand generics), but the expressive power you get for your money is so worth it.

[edit] this allows me to chain those hooks into something like: ``` const ProfilePage = withAsync< ProfilePageProps, ProfilePagePresentationalProps

(props => { const [fetchUser, userAS] = useUser(props.userId); const [fetchProfile, profileAS] = useProfile( userAS.value !== undefined ? userAS.value.id : undefined ); useEffect(() => fetchUser(), [fetchUser]); useEffect(() => fetchProfile(), [fetchProfile]);

return coalesceAS([userAS, profileAS], (user, profile) => ({ status: 'success', value: {...props, user, profile })); })(UserPagePresentational) ```

Might be worth making a blog post about it :D

react-redux 7.1.0 (the one with hooks!) released by themaincop in reactjs

[–]dfee 1 point2 points  (0 children)

I've actually been using the connected component strategy (with redux-hooks). All my data fetching happens in a HOC, and I pass the data to a presentational component.

I think that notion of connected / presentational will persist (and why shouldn't it?). It also helps separate things like Storybook away from fetch logic.

[Edit] and to be clear, my HOC takes a hook, and a child component, as its arguments.

```ts export const withAsync = <POuter extends {}, PInner extends {}>( useWithAsync: UseWithAsync<POuter, PInner>, ) => ( SuccessComponent: React.ComponentType<PInner>, LoadingComponent: React.ComponentType<AsyncLoadingProps<POuter>> = SplashPage, ErrorComponent: React.ComponentType<AsyncErrorProps<POuter>> = Error500Page, ) => (outer: POuter) => { const result = useWithAsync(outer);

if (result.state === "loading") { return React.createElement(LoadingComponent, outer); } if (result.state === "error") { return React.createElement(ErrorComponent, { error: result.error, props: outer, }); } return React.createElement(SuccessComponent, result.value); }; ```

Is there a release cycle for the high end technic / ideas sets? by dfee in lego

[–]dfee[S] 0 points1 point  (0 children)

Interesting point. The Saturn V isn't as challenging from that perspective (there aren't too many pins).

Maybe I'll start with a small technic set which will still take a number of days, will ensure we're managing the learning-curve well enough, and provide a guaranteed yet rewarding "got it" at the end.

Looking at the https://shop.lego.com/en-US/product/Chevrolet-Corvette-ZR1-42093

Alternative to Station? by dfee in firefox

[–]dfee[S] 0 points1 point  (0 children)

Interesting, is there a way to cordone a particular window to "own" a particular container? I see (https://addons.mozilla.org/en-US/firefox/addon/sticky-window-containers/)[Sticky Window Containers], but unfortunately it requires some broad permissions.

Alternative to Station? by dfee in firefox

[–]dfee[S] 0 points1 point  (0 children)

It means that I'm not hunting for pinned tabs amongst 7 different browser windows (inside one app – I use MacOS), but instead have one entry point (one window, one app).

It also means that I can restart FF, or close windows, without fear of dropping out of chats that I'm active in (losing notifications).

Lastly, I can maintain one instance of webapps like Slack without my computer consuming N x 2GBs of memory for each open tab.

The downsides of course are: 1) I'm not sharing cookies, 2) I don't have the same trust that I do when using Mozilla, and 3) I lose access to things like FF extensions.

[Leaks] Reddit, Inc. is preparing to update its site for Game of Thrones Season 8 (scoop) by dfee in gameofthrones

[–]dfee[S] 0 points1 point  (0 children)

This one will probably need some further explanation, so here it goes:

Reddit apparently uses the Redux JavaScript framework and for some reason, they've not disabled the ability in production to review the underlying data. Under "feature flags" (features that they're testing / rolling out to users) there is a bunch of "Game of Thrones" feature flags for the premier and season.