Skip to content

Commit 66b347f

Browse files
committed
v 0.13.1 - more explicit error
yellow box gets hidden below red box
1 parent 63d98de commit 66b347f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-popup-menu",
3-
"version": "0.13.0",
3+
"version": "0.13.1",
44
"description": "extensible popup/context menu for react native",
55
"main": "src/index.js",
66
"directories": {

src/MenuProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const layoutsEqual = (a, b) => (
1616

1717
const isFunctional = Component => !Component.prototype.render;
1818

19-
if (!createContext) {
20-
console.warn('New React context API not available - are you using RN 0.55+ ?')
19+
if (!React.forwardRef) {
20+
throw new Error('This version of popup-menu requires RN 0.55+. Check our compatibility table.')
2121
}
2222
export const PopupMenuContext = createContext({})
2323
export const withCtx = withContext(PopupMenuContext, "ctx");

0 commit comments

Comments
 (0)