In Livewire 3, if you want to reset some form inputs without causing a re-render of the component, you can use the skipRender method. This method allows you to skip the rendering process for the current Livewire lifecycle.
Here's an example of how you might use skipRender in combination with resetExcept:
class YourComponent extends \Livewire\Component
{
public $inputOne;
public $inputTwo;
public $inputThree;
public function resetForm()
{
// Reset all properties except 'inputThree'
$this->resetExcept(['inputThree']);
// Skip rendering after resetting
$this->skipRender();
}
// Other methods and properties
}
In this example, when the resetForm method is called, it will reset inputOne and inputTwo to their default values without affecting inputThree. After resetting the desired properties, calling $this->skipRender() ensures that the component does not re-render, thus achieving the desired behavior of resetting form inputs without a re-render.
Remember to use this feature judiciously, as skipping the render might lead to a UI that is out of sync with your component's state if not managed correctly.