Slide 16
Slide 16 text
React Fragment
scene = “INBOX”
USER_ID = “xxxx”
HashMap data = new HashMap<>(1);
data.put(USER_ID, userId);
ReactFragment inboxContent
= ReactFragment.newInstance(INBOX, data);
HashMap params
= getArguments().getSerializable(DATA);
Bundle bundle = new Bundle();
bundle.putString(
”initialScene”,
getArguments().getSerializable(SCENE));
bundle.putSerializable(React.Param.DATA, data);
reactView.startReactApplication(
reactManager, ReactService.MAIN_MODULE, bundle);
• Handles which React Native Screen to open
HomeActivity.java
ReactFragment.java