Check out example codes for "modelmap in spring mvc". It will help you in understanding the concepts better.

Code Example 1

@GetMapping("/showViewPage")public String passParametersWithModel(Model model) {    Map<String, String> map = new HashMap<>();    map.put("spring", "mvc");    model.addAttribute("message", "Baeldung");    model.mergeAttributes(map);    return "viewPage";}

Learn ReactJs, React Native from akashmittal.com