#Create new component have an error

2 messages · Page 1 of 1 (latest)

primal hemlock
#

hello seek help, i've component with livewire, this is the code:

`<?php

namespace App\Livewire;

use Livewire\Component;

class RefreshWarning extends Component
{

public $data;

public function __construct(
    protected string $name,
) {}

public static function make(string $name): self
{
    return new self($name);
}
public function mount($data = null)
{
    $this->data = $data;
}

public static function canView(): bool
{
    return true;
}


public function render()
{
  
    return view('livewire.refresh-warning');
}

}`

when i call that component like this:
RefreshWarning::make($this->isActive)

have error:
Filament\Forms\ComponentContainer::Filament\Forms\Concerns{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, App\Livewire\RefreshWarning given

please help me:( i'm stuck on 3days

daring grailBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution