Skip to content

Commit

Permalink
Fix useScreens -> enableScreens renaming (#189)
Browse files Browse the repository at this point in the history
There was a bug in PR that introduces enableScreens method to replace useScreens. The bug was that the method did not end up being exported (we use module.exports and not export syntax). On top of that I'm adding a deprecation warning to useScreens method as it interferes with some react hooks tooling.
  • Loading branch information
kmagiera committed Oct 22, 2019
1 parent faff113 commit 4749405
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/screens.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export function enableScreens(shouldEnableScreens = true) {

// we should remove this at some point
export function useScreens(shouldUseScreens = true) {
console.warn('Method `useScreens` is deprecated, please use `enableScreens`');
enableScreens(shouldUseScreens);
}

Expand Down Expand Up @@ -202,6 +203,7 @@ module.exports = {
ScreenStackHeaderTitleView,
ScreenStackHeaderCenterView,

enableScreens,
useScreens,
screensEnabled,
};

0 comments on commit 4749405

Please sign in to comment.