Check out example codes for "laravel components pass array". It will help you in understanding the concepts better.

Code Example 1

As far as I know, it isn't possible to pass an array to a component via @slot.
However, it is possible to pass and an array to a component directly, without
using a slot.

@component('mylayouts.partials.contentheader', ['my_array' => ['a', 'b', 'c']])

Then, within your component file, you will have access to a $my_array variable.
For example, in your contentheader.blade.php file you can do this:

    @foreach($my_array as $value)
        <li>{{ $value }}</li>

Learn ReactJs, React Native from