rad_hooks 0.0.1 copy "rad_hooks: ^0.0.1" to clipboard
rad_hooks: ^0.0.1 copied to clipboard

outdated

A set of extensible and powerful hooks for using in your Rad applications.

Rad Hooks #

A set of commonly used React hooks for using in your Rad applications.

Basic Usage #

Widget someReUsableWidget() => HookScope(() {

  // create a state variable
  var state = useState(1);

  return Division(
    innerText: 'You clicked me ${state.value} times!',
    onClick: (e) => state.value++, // <- update state(causes re-render)
  );
});

void main() {
  runApp( 
    app: someReUsableWidget(),
    appTargetId: 'output',
  );
}

This package also serves as an example that show cases flexibility and power of hooks APIs in Rad. If you feel like missing a hook, you can just create it and hook it in your application. We recommend you to look into implementation of hooks in this package for getting an idea on how to create your own hooks which then can be used directly in your Rad applications.

1
likes
0
pub points
0%
popularity

Publisher

verified publishererlage.com

A set of extensible and powerful hooks for using in your Rad applications.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

meta, rad, test

More

Packages that depend on rad_hooks