Check out example codes for "viewBag as a list". It will help you in understanding the concepts better.

Code Example 1

<td>@((ViewBag.data as ICollection<Person>).First().FirstName)</td>

Code Example 2

<ul>
    @foreach (var person in ViewBag.data)
    {
        <li>@person.FirstName</li>
    }
</ul>

Learn ReactJs, React Native from akashmittal.com