Skip to content

Commit

Permalink
Add useMapContext
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Feb 15, 2023
1 parent 8a8ef7c commit 749d3c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hocs/withMapContext.js
@@ -1,6 +1,8 @@
import React, { useContext } from 'react';
import { MapContext } from '../Map';

export const useMapContext = () => useContext(MapContext);

const withMapContext = (WrappedComponent) =>
React.forwardRef((props, ref) => {
const context = useContext(MapContext);
Expand Down

0 comments on commit 749d3c3

Please sign in to comment.