- company location / remote?
- what project management method?
- good and bad company culture?
- performance reviews?
- what's the path to profitability?
// Example of using multiple / nested `createEntityAdapter` calls within a single Redux Toolkit slice | |
interface Message { | |
id: string; | |
roomId: string; | |
text: string; | |
timestamp: string; | |
username: string; | |
} |
const createMySocketMiddleware = (url) => { | |
return storeAPI => { | |
let socket = createMyWebsocket(url); | |
socket.on("message", (message) => { | |
storeAPI.dispatch({ | |
type : "SOCKET_MESSAGE_RECEIVED", | |
payload : message | |
}); | |
}); |
import {action1, action2} from "myActions"; | |
import {bindActionCreators} from "redux"; | |
import {connect} from "react-redux"; | |
const mapStateToProps = (state, ownProps) = { | |
return { | |
counter : state.counter, | |
someComponentValue : state.things[ownProps.someIdProp] | |
}; | |
} |
- Migration Guides
- Release Notes
- Yes,
createStore
is still deprecated! https://redux.js.org/usage/migrations/migrating-rtk-2#createstore-deprecation
// See https://blog.isquaredsoftware.com/presentations/react-redux-ts-intro-2020-12/#/36 for slides | |
// My basic render function structure: | |
function RenderLogicExample({ | |
someBoolean, // 1) Destructure values from `props` object | |
someList, | |
}) { | |
// 2) Declare state values | |
const [a, setA] = useState(0); | |
const [b, setB] = useState(0); |
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.
[9:13 PM] harry : @acemarke are people still going to need to add Connect
components to their jsx to use a redux hook? i couldnt tell where that ended up
[9:13 PM] harry : didnt 100% grok the whole thing
[9:13 PM] acemarke : awright, lemme recap the issue
[9:13 PM] acemarke : :)
[9:13 PM] harry : sweet
[9:13 PM] acemarke : from the top
[9:13 PM] harry : i kinda got the gist of the zombie child thing too. not sure how a child actually subscribes before a parent, though
[9:14 PM] acemarke : (drat... I can already tell this is gonna be one of those chats I have to export to a gist because I'm about to write a lot)
[9:15 PM] acemarke : up through v4, there was a potential bug due to the timing of store subscriptions
[9:15 PM] acemarke : wrapper components subscribe in componentDidMount
, which fires bottom-up
import React from 'react'; | |
import Jumbotron from 'react-bootstrap/Jumbotron'; | |
import Alert from 'react-bootstrap/Alert'; | |
import Button from 'react-bootstrap/Button'; | |
import { FallbackProps } from 'react-error-boundary'; | |
interface AEFProps extends FallbackProps { |