MK
Size: a a a
MK
B
Т
seat = useSelector(state => selectSeatById(state, props.id));
selectSeatById = createCachedSelector(selectSeats,
(_, id) => id,
selectSeatGeometry,
(seats, id, geometry) => {
const seat = seats.byId[id];
return ({
available: isAvailable(seats.byId[id], seats.byId),
isCompanion: seats.byId[id].type === "companion",
...geometry,
...seat
})
})((seats, id) => id);
AA
AA
Т
AA
Т
PK
AA
AA
b
Т
AA
VK
Т
AA
AA
VK
AA
useSelector()
uses strict ===
reference equality checks by default, not shallow equality (see the following section for more details).