NAME
Reactive::Mojo::Plugin - Mojolicious plugin for Reactive
VERSION
Version 0.103
SYNOPSIS
Register the plugin in startup method of your Mojolicious App
It takes `namespaces` configuration param which should be an arrayref of the namespaces within your app to scan for Reactive components
sub startup ($self) { ... $self->secrets($config->{secrets});
$self->plugin(
'Reactive::Mojo::Plugin',
{
namespaces => [
'My::App::Components',
],
},
);
...
Then within you templates you can use a component like
<%= reactive('Counter') %>
or if there is initial state you want to set
<%= reactive('Counter', value => 10) %>
add the required JS with <%= reactive_js %>
see Reactive::Core and Reactive::Examples for more information about creating components
register($self, Mojolicious $app, HashRef $conf) This register method is not expected to be called directly via userland code but instead will be called by Mojoicious when adding the plugin
$self->plugin(
'Reactive::Mojo::Plugin',
{
namespaces => [
'My::App::Components',
],
},
);
AUTHOR
Robert Moore, <robert at r-moore.tech>
BUGS
Please report any bugs or feature requests to bug-reactive-mojo at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Reactive-Mojo. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Reactive::Mojo::Plugin
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
This software is Copyright (c) 2025 by Robert Moore.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)