Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Add setup POC #1

Closed
klarkc opened this issue Aug 19, 2021 · 8 comments
Closed

Add setup POC #1

klarkc opened this issue Aug 19, 2021 · 8 comments

Comments

@klarkc
Copy link
Owner

klarkc commented Aug 19, 2021

I am looking for how purscript effect system could work with vue setup hook in a non intrusive way.

@klarkc
Copy link
Owner Author

klarkc commented Aug 19, 2021

My guess is that vue "ref" function is effectful, so this gonna be helpful https://book.purescript.org/chapter10.html#effectful-functions

@klarkc klarkc changed the title Add an effect-full example Add an effectful example Aug 19, 2021
@klarkc
Copy link
Owner Author

klarkc commented Aug 19, 2021

@klarkc
Copy link
Owner Author

klarkc commented Mar 7, 2022

Effectful example in POC: 4d91e4c

@klarkc
Copy link
Owner Author

klarkc commented Mar 8, 2022

My guess is that vue "ref" function is effectful, so this gonna be helpful https://book.purescript.org/chapter10.html#effectful-functions

The ref function is not side-effect free because it uses reactive, which uses a effectful function mutating reactiveMap.

@klarkc
Copy link
Owner Author

klarkc commented Mar 8, 2022

Fixed on 8f0bd65, changing Ref logic, it will be just a reference to the reactive object to be used inside Effect monad.

@klarkc
Copy link
Owner Author

klarkc commented Mar 8, 2022

There still a problem, how set/get would know how to address the ref. The only solution that I think is to have side-effects on ref, requiring the use of Effect monad

@klarkc
Copy link
Owner Author

klarkc commented Mar 8, 2022

I'm still considering this composition api approach, I'm seeing that composition api hides a lot of side-effects

@klarkc klarkc changed the title Add an effectful example Add setup POC May 30, 2022
@klarkc
Copy link
Owner Author

klarkc commented May 30, 2022

Done in 7ff1b2a

@klarkc klarkc closed this as completed May 30, 2022
@klarkc klarkc added this to the Proof of Concept milestone May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant