robinweser / alveron

Tiny (0.8kb) Elm-inspired state management for React
https://alveron.js.org
MIT License
73 stars 2 forks source link

Connect helper #15

Closed scerelli closed 5 years ago

scerelli commented 5 years ago

I was wondering if there's any reason for the absence of a connect helper.

Let's say i have stateful component and I want to call an effect that fetches an API on componentDidMount. How can i achieve it without hooks?

because right now i was trying to use Hooks but i get useAlveron is not a function because on import it's an object and not a function, so i suppose my react version doesn't support hooks.

"react": "16.6.3",

robinweser commented 5 years ago

Why did you close that one? Found that hooks require >16.8.0? I was just about to answer this week :/

scerelli commented 5 years ago

i wrote a sort of helper to achieve something like connect but if you want to keep it open i can reopen it. I got no answer so i thought you were no interested in it.