Conference Event Planner
A React and Redux Toolkit exercise that turns conference room selections into a running venue subtotal, with quantity controls for each space.

Conference Expense Planner (IBM Course Project)
I built this with React and Redux Toolkit as part of the IBM course. It's a planner where users pick venue rooms for a conference and the cost is calculated from their selections.
The venue selection is fully working. The add-ons, meals, and total cost sections are still unfinished stubs in the repo, so I'm describing only what's implemented.
Redux state for venues
The venue slice holds the list of rooms, each with a name, cost, and quantity. Two reducers update quantity by index, and the auditorium is capped at 3 bookings:
reducers: {
incrementQuantity: (state, action) => {
const { payload: index } = action;
if (state[index]) {
if (state[index].name === "Auditorium Hall (Capacity:200)" && state[index].quantity >= 3) {
return;
}
state[index].quantity++;
}
},
decrementQuantity: (state, action) => {
const { payload: index } = action;
if (state[index] && state[index].quantity > 0) {
state[index].quantity--;
}
},
},Reading and updating state in the component
ConferenceEvent reads the rooms with useSelector, dispatches actions on button clicks, and works out how many auditorium bookings remain:
const venueItems = useSelector((state) => state.venue);
const dispatch = useDispatch();
const remainingAuditoriumQuantity =
3 - venueItems.find(item => item.name === "Auditorium Hall (Capacity:200)").quantity;
const handleAddToCart = (index) => {
if (venueItems[index].name === "Auditorium Hall (Capacity:200)" && venueItems[index].quantity >= 3) {
return;
}
dispatch(incrementQuantity(index));
};Conditional UI and cost calculation
The plus and minus buttons switch to a disabled style when a limit is reached (0 for minus, 3 for the auditorium, 10 for other rooms):
<button
className={remainingAuditoriumQuantity === 0 ? "btn-success btn-disabled" : "btn-success btn-plus"}
onClick={() => handleAddToCart(index)}
>
+
</button>The venue total is the sum of cost times quantity:
const calculateTotalCost = (section) => {
let totalCost = 0;
if (section === "venue") {
venueItems.forEach((item) => {
totalCost += item.cost * item.quantity;
});
}
return totalCost;
};What I learned
- Managing state with Redux Toolkit slices and the
Provider - Updating items by index and enforcing limits in reducers
- Rendering lists with conditional classes and disabled states
- Deriving values (remaining bookings, totals) from store state
Things to fix before sharing
- In
venueSlice.js, the reducer compares against" Auditorium Hall (Capacity:200)"with a leading space, so the cap isn't enforced there. The component guard is what stops it. Removing the space fixes that. - The
avSliceandmealsSlicereducers are empty and aren't registered instore.js, andTotalCostdoesn't display anything yet. If you describe the project publicly, say it's a partial implementation, or finish those parts first.