Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is valtio-factory production ready? #5

Open
Relaxe111 opened this issue Jun 15, 2023 · 3 comments
Open

Is valtio-factory production ready? #5

Relaxe111 opened this issue Jun 15, 2023 · 3 comments
Labels
question Further information is requested

Comments

@Relaxe111
Copy link

Hi, we are using mobx-state-tree + ts in our production code for quite few years, and I am well familiar with strong and weak parts of the mst. We now started to encounter issues with memory consumption in our applications in production especially on big data models. For quite a few time i have in mind to make a valtio-state-tree library, luckily you're library is quite similar with what i wanted to try to implement, and it looks promising.
Do you use this library in production?
Is there any hints if this library is memory efficient?
How one will do a fetch in valtio-factory?
Thanks in advance.

@Relaxe111 Relaxe111 changed the title Can i use valtio-factory in production? Is valtio-factory production ready? Jun 15, 2023
@mfellner
Copy link
Owner

Hi, thanks for your interest in this library!

Do you use this library in production?

No, unfortunately I'm currently not using the library in production myself.

Is there any hints if this library is memory efficient?

Besides the static initialisation, no additional memory should be allocated at runtime (except what vanilla valtio might allocate).

How one will do a fetch in valtio-factory?

Not sure what you mean by that. Can you give an example? Probably https://github.com/mfellner/valtio-factory#define-actions

At the end of the day this library just provides some sugar on top of valtio. Perhaps you should start using vanilla valtio first to see if it meets your requirements!

@mfellner mfellner added the question Further information is requested label Jun 20, 2023
@Relaxe111
Copy link
Author

hi thank you for answer.
by How one will do a fetch in valtio-factory? i mean how i do promise based requests. in mst I can use flow(function* (){..}) how can i do an request for fetching data from an api. For example with axios?

@jkhaui
Copy link

jkhaui commented Apr 14, 2024

@Relaxe111 In my opinion the implementation you're describing is probably considered an anti-pattern now in 2024.

What I mean by this is that you probably want to use a lib like tanstack query to handle your data fetching & async server state rather than a state management tool whose main purpose is to manage granular client-side reactivity. But that's just my opinion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants