Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Feb 23, 2021
1 parent 25f0635 commit 75de4ad
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/ItemProvider/ItemProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,9 @@ export const useItemSetter = () => useContext(ItemSetterContext);
export default function ItemProvider({ children }) {
const [item, setItem] = useState( {} );

useEffect( _ => console.log("Current Item is: ", item));

const setItemWrapper = (newItem) => {
console.log("Old Item: ", item);
setItem(newItem);
console.log("Set new item.");
}

return (
<ItemContext.Provider value={item}>
<ItemSetterContext.Provider value={setItemWrapper}>
<ItemSetterContext.Provider value={setItem}>
{children}
</ItemSetterContext.Provider>
</ItemContext.Provider>
Expand Down

0 comments on commit 75de4ad

Please sign in to comment.