feat: add demo#6
Conversation
|
Which fetch("/user", ~params={
name,
age,
})I was trying to use |
|
Another thing I've noticed is that there are form values somewhere on the README snippet. Should I use |
|
I think it could be just a useState to keep the demo simpler! About the endpoint it could be a simple fastify server that we can spin up together with Webpack like in here https://github.com/fakenickels/es2077-course-slides/blob/master/forms-com-reason/server.js, everything needed for it's on this file and the only dependencies are |
|
@GuilhermedeAndrade if u are using let requestData = url => Fetch.fetch(url)|>Promise.Js.fromBsPromise|>Promise.Js.toResult;
[@react.component]
let make = () => {
let (AsyncHook.{ state }, _) = AsyncHook.use((~cb)=> cb(() => requestData(url)));
<div>
<form>
</form>
</div>
}; |
Thank you @vmarcosp! I'll keep this in mind once I start working on it again |
|
@fakenickels @vmarcosp guys, I'd like to say that I'm sorry but I won't be able to keep working on this (at least not in the near future). I need to focus on some personal things right now. Since I'm still learning Reason, this PR is really challenging and, thus, time-consuming for me. |
|
No problem! 👊 |
|
Hey no worries at all! I'm going to reopen your PR so we can continue and merge! |
This PR will add a demo