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

Platformweb

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

example/README.md

Sample: #

A basic example with useState hook:

Widget widgetFunction() => HookScope(() {
  // create a stateful value
  var state = useState(0);

  return Span(
    child: Text('You clicked me ${state.value} time!'),
    onClick: (_) => state.value++, // will cause a re-render
  ); 
});

runApp(app: widgetFunction(), ...);

Creating custom hooks #

Rad supports a easy yet powerful Hooks API that you can use to create your own hooks. There are number of hooks that we provide which you can use by importing the package rad_hooks. If you want to create your own hooks, feel free check out implementations residing inside package.

1
likes
140
pub points
11%
popularity

Publisher

verified publishererlage.com

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

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

BSD-3-Clause (LICENSE)

Dependencies

meta, rad

More

Packages that depend on rad_hooks