fibo / trunx

Super Saiyan React components, son of awesome Bulma
MIT License
64 stars 14 forks source link

use hooks! #22

Closed fibo closed 4 years ago

fibo commented 5 years ago

React hooks are not yet widely adopted but for the purpouse of this project they can be a really good choice.

They simplify code a lot, and can also reduce the bundle size a lot.

See for example this starting point https://github.com/fibo/trunx/commit/a0a1d4bb25a886162b2a152db66ecd9a9d75dbc2

fibo commented 4 years ago

In some cases, using classes is still preferable, for example for Icon and Icon.Svg I prefer the generated definitions using classes.