flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.64k stars 408 forks source link

Multiple renders keeps the previous state When I render multiple views as components, they keep the state of previous arguments passed to them instead of reinitialize with default value each render. #577

Closed fadrian06 closed 6 months ago

fadrian06 commented 7 months ago

Steps to reproduce the behavior:

Flight::render('myComponent', ['var1'=>1]);
Flight::render('myComponent', [ ]); // $var1 is still 1

Expected behaviour Each render clean previous vars.

Environment: