Forcing Livewire to render after creating a record

Filament v4 speeds up your app by skipping unnecessary Livewire renders. But sometimes you do want the page to update right after an action, for example, when creating a record.
The Problem
In Filament v3, when you used the Create another action in a Relation Manager, the page behind the form re-rendered as soon as the record was saved. You could see the content refresh immediately after the action.
In Filament v4, that behavior changed. The action now preserves the existing page content and avoids re-rendering the Livewire component behind the form. This reduces unnecessary requests and makes forms faster, but it also means users won't see updates (like new records) until they close the modal.
Sometimes, though, you want to show changes right away to confirm that a record was successfully inserted.
Starting in Filament v4.0.19, a new method called forceRenderAfterCreateAnother was introduced (thanks to howdu). You can now use it on any CreateAnother action:
<?php
namespace App\Filament\Resources\Posts\RelationManagers;
use App\Filament\Resources\Categories\Schemas\CategoryForm;
use App\Filament\Resources\Categories\Tables\CategoriesTable;
use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\DetachAction;
use Filament\Actions\EditAction;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Model;
class CategoriesRelationManager extends RelationManager
{
protected static string $relationship = 'categories';
public function form(Schema $schema): Schema
{
return CategoryForm::configure($schema);
}
public function table(Table $table): Table
{
return CategoriesTable::configure($table)
->headerActions([
CreateAction::make()
->fillForm([
'name' => fake()->word(),
'slug' => fake()->slug(),
'content' => fake()->paragraph(3),
'published' => true,
'published_at' => now(),
])
->forceRenderAfterCreateAnother()
->after(fn () => $this->dispatch('refresh-page')),
])
->recordActions([
EditAction::make(),
DetachAction::make(),
DeleteAction::make()
->after(fn () => $this->dispatch('refresh-page')),
]);
}
public static function getBadge(Model $ownerRecord, string $pageClass): ?string
{
return $ownerRecord
->categories()
->count() ?: 0;
}
}
With this method, the page updates immediately after inserting a record, giving users instant feedback while still letting you use the Create another flow.
Conclusion
Filament v4's default "partial rendering" approach improves performance by cutting down on Livewire requests.
But in cases where user feedback matters, forceRenderAfterCreateAnother (or manually $livewire->forceRender()) allows you to update the component immediately after inserting a record.
Download source code
Run project on Firebase Studio
- Open studio.firebase.google.com and import the repository
https://github.com/wiremodel/simple-blog - Run the project. Once it's up, switch to the correct branch:
git checkout v4/action-force-render
Update dependencies and migrate the database:
composer update -W
php artisan migrate:fresh --seed
.env file has APP_URL set to the URL provided by Firebase Studio.