Undefined offset: 1 when looping an array

What seems to be the problem:
I am trying to loop through an array and keep getting: Undefined offset: 1
It does not make any sense to me


namespace App\Http\Livewire\Frontend;

use Livewire\Component;

class TestForm extends Component

    public $questionsList;

    public function render()

        $this->questionsList = [];
            $this->questionsList[0] = 1;
            $this->questionsList[1] = 2;
            $this->questionsList[2] = 3;
        return view('livewire.frontend.test-feedback-form');

    @if (count($questionsList) > 0) 
        @foreach ($questionsList as $key => $value)


Steps to Reproduce:
As the code is I get the error. If I comment out the foreach loop, the script runs fine and I can see my count array is 3 elements

Are you using the latest version of Livewire:

It may just be a typo but you need @endforeach at the end of the loop.