Les vidéos de la salle 252AB viennent d'être republiées. Nous invitons donc les oratrices et orateurs concernés à vérifier que tout est de nouveau OK
- https://t.co/9Yq9xScTsv
- https://t.co/uclvpKh621
- https://t.co/lvpOpQToAi
The React docs on useMemo are worth a read. They even had to artificially slow down their examples to motivate a use case – driving home the point that useMemo should be the exception not the rule!
https://t.co/7tpvqoqV9y
I've used useCallback maybe once or twice in the last 3 years, never useMemo 🤷♂️
And every time I've seen them when pairing/consulting we've always refactored them out
always-rerender is the beauty, heart & soul of React!
🧪 React testing tip : use @testing-library/user-event over fireEvent where possible:
fireEvent.change triggers a single change event on the input.
userEvent.type triggers keyDown, keyPress, and keyUp events for each character as well, resembling user interaction better. ↓
Hot take: 🌶️
If I need data “power tools” like Lodash, Underscore, Ramda, Remeda in my web UI, I should probably improve my backend APIs instead.
If we can get the data right on the server, that’s often preferable to heavy data processing on the client.
Problem: aria-labels are often overly broad. Remember, an aria-label provides a label for assistive tech. So the user may not be able to see the surrounding context.
Solution: Put the necessary info in the aria-label. Write aria-labels that are more specific than visual labels.
“Array Types in TypeScript”
by @TkDodo
https://t.co/Y8LLjszzXt
Dominik makes some compelling arguments. Personally, I default to ReadonlyArray<T> unless there's a good reason not to.
💡 React devs, it's time to start using Array.prototype.with()
The easy way to replace an existing element in a React state array
Much more convenient than array.splice/map 👌
✅ ES stage-4
✅ available in latest browsers
⚠️ 82% caniuse support
✅ polyfills
When using URL pagination, it is important to use links instead of buttons.
To properly disable a link, you can omit the `href` and specify the `role` and `aria-disabled` attributes.
Enabled: <a href="#">
Disabled: <a role="link" aria-disabled="true">
As a developer, I know I’m not a designer. But that doesn’t mean I should blindly implement designs.
I push back on designs that are:
🚫 Insecure
🚫 Confusing
🚫 Incomplete
🚫 Inaccessible
🚫 Inconsistent
🚫 Not performant
Assuring a good user experience is everyone’s job.
💥 16 little UI design rules that make a big impact
UI design might appear to be a magical art form, but a lot of it is made up from logical rules or guidelines.
We’ll redesign an example interface using 16 of 100+ guidelines from my book - @PracticalUI
A mega thread👇