Skip to content

Commit

Permalink
Use static constants instead of strings when referring to View Manage…
Browse files Browse the repository at this point in the history
…rs 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
  • Loading branch information
axe-fb authored and facebook-github-bot committed Nov 9, 2018
1 parent 0e4b318 commit 2e71a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReactSliderManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {

private static final int STYLE = android.R.attr.seekBarStyle;

private static final String REACT_CLASS = "RCTSlider";
public static final String REACT_CLASS = "RCTSlider";

static class ReactSliderShadowNode extends LayoutShadowNode implements
YogaMeasureFunction {
Expand Down

0 comments on commit 2e71a10

Please sign in to comment.