Skip to content

Commit 09dfaf6

Browse files
axe-fbfacebook-github-bot
authored andcommitted
Use static constants instead of strings when referring to View Managers and Native Modules
Summary: Using strings to refer to Native Modules and View Managers in ReactPackages are prone to error. The compiler replaces the constants with the actual strings anyway, so using constants gives us better type safety Reviewed By: achen1 Differential Revision: D12843649 fbshipit-source-id: 7a7c6c854c8689193f40df92dc8426a3b37f82c8
1 parent 08b82e2 commit 09dfaf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactViewPagerManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@ReactModule(name = ReactViewPagerManager.REACT_CLASS)
2929
public class ReactViewPagerManager extends ViewGroupManager<ReactViewPager> {
3030

31-
protected static final String REACT_CLASS = "AndroidViewPager";
31+
public static final String REACT_CLASS = "AndroidViewPager";
3232

3333
public static final int COMMAND_SET_PAGE = 1;
3434
public static final int COMMAND_SET_PAGE_WITHOUT_ANIMATION = 2;

0 commit comments

Comments
 (0)