v 0.13.1 - more explicit error

yellow box gets hidden below red box
This commit is contained in:
Stanislav Miklik 2018-05-04 22:05:07 +02:00
parent 63d98de0e5
commit 66b347f044
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "react-native-popup-menu",
"version": "0.13.0",
"version": "0.13.1",
"description": "extensible popup/context menu for react native",
"main": "src/index.js",
"directories": {

View File

@ -16,8 +16,8 @@ const layoutsEqual = (a, b) => (
const isFunctional = Component => !Component.prototype.render;
if (!createContext) {
console.warn('New React context API not available - are you using RN 0.55+ ?')
if (!React.forwardRef) {
throw new Error('This version of popup-menu requires RN 0.55+. Check our compatibility table.')
}
export const PopupMenuContext = createContext({})
export const withCtx = withContext(PopupMenuContext, "ctx");