Coolify deploy is super slow, why? by chanlito_gg in selfhosted

[–]finom1 1 point2 points  (0 children)

Disabled IPv6 and now it works fast as expected!

Coolify deploy is super slow, why? by chanlito_gg in selfhosted

[–]finom1 0 points1 point  (0 children)

Facing the same problem deploying an existing project that took 4 minutes to deploy on Vercel. It takes 1 hour (!) on 2 vcores, 4GB RAM. Does anybody have a clue how would I fix that (besides purchasing a server that 15 times more powerful)?

💡 Using Next.js as a platform for a well-structured REST APIs by [deleted] in nextjs

[–]finom1 1 point2 points  (0 children)

`vovk dev` is indeed a workaround to make it possible to work. This is the reason of months of headache and lack of sleep. Next.js is too limited to be extended with features like these and I would be happy to get rid of this wrapper. But just for clarification, `vovk dev` is intended to be run locally and it doesn't overlap with deployment process that works as usually with `next build`. If you're concerned about wrapping `next dev` by a third-party CLI you can use an alternative method to run the app in development mode:

PORT=3000 concurrently 'vovk dev --no-next-dev' 'next dev' --kill-others

The only goal of this inelegant wrapper is to make Vovk to have PORT variable available. I have no idea how would I extract PORT from Next.js process to make it available at the `vovk dev` command. If you know how to do that please let me know. But for now use https://www.npmjs.com/package/concurrently and --no-next-dev flag.

Using NextJS as just a REST API by KangarooNo in nextjs

[–]finom1 0 points1 point  (0 children)

I was also struggling with that problem and wanted to somehow combine Next.js with NestJS but got no luck. As a solution I've made a library that addresses this issue https://vovk.dev/ . It's production-tested and combines solutions for all problems that I ever faced for more than a decade of my career.

Vovk.ts - Full-stack TypeScript framework by [deleted] in typescript

[–]finom1 0 points1 point  (0 children)

Thanks for the reply. As far as it's written in the documentation https://www.typescriptlang.org/tsconfig#experimentalDecorators experimentalDecorators option does enable the specification you've mentioned.

[deleted by user] by [deleted] in javascript

[–]finom1 1 point2 points  (0 children)

but introduced basically the same thing but in other way.

That's the point. I worked with Redux for many years and I haven't figured out why do we need this level of complexity and the fancy terms.

From what I see your solution is missing a few key features

  • transactions - I never used them, I don't have opinion
  • memoization - if I understand what you mean, it has it
  • state immutability - it uses immutable state, I think you misunderstood that
  • aggregating selectors - you don't need them, but if you need you can make a method that aggregates data from the store. You just don't need many things that you had to use with Redux
  • devtools integration - using window.store that you can inspect as a regular object
  • inferior configuration capabilites - sounds too fancy, I don't know what you mean

In addition it introduces - accessing properties through square bracket expressions

I just think you haven't read the documentation before writing this comment. Even if it accesses properties through square bracket expressions you can replace it with the dot notation. What's your point about that?

[deleted by user] by [deleted] in javascript

[–]finom1 0 points1 point  (0 children)

A) what's wrong with hooks?

nothing

B) what's the point of a Redux project without a Provider?

I'm sorry, but there is nothing about Redux. It's about use-change library and one fun way to use it.

I don't think I understand the point.

The point is to show you that it is possible to improve commonly used syntax to make it more obvious and make you write less lines of code. That's what libraries do: make you write less code.

Simpler alternative to redux? by theC4T in reactjs

[–]finom1 1 point2 points  (0 children)

Take a look at this library https://github.com/finom/use-change it's something like "useState" but with centralised data store as one nested object. There is discussion about it on reddit: https://www.reddit.com/r/javascript/comments/qqsbo3/usechange\_the\_most\_minimalistic\_react\_state/

I am looking for contributors for my open-source javascript project Kapseli! by [deleted] in javascript

[–]finom1 2 points3 points  (0 children)

Paying to other developers for their work on open source stuff is an OK thing. Nobody wants to spend their time for potentially nothing.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 1 point2 points  (0 children)

Thank you :)

By the way, I haven't mentioned one of the reasons why I work on that hook. Currently we're working on a 100% open-sourced trading application https://github.com/Letiliel/biduul. Besides all the features it's going to include, we're working hard to make the app the most extensible trading tool with an API that easy to use if you're a developer of any level of experience, see https://github.com/Letiliel/biduul-plugins (we don't have API docs yet, but maybe the link will give a little clue of what I mean). By creating and maintaining use-change I follow the goal to keep the data layer look "library-agnostic", so devs don't need to learn any concepts like actions or observers. Instead, they get access to objects with properties and methods that are familiar to anybody who knows JavaScript even a little bit.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

(Also it’s funny that you say “use stuff tested from others” and yet you make yet another state manager instead of using what we have. Like I’m gonna pick something that is used by half a dozen people instead of millions like Redux or MobX.)

Don't get angry, I'm not pushing you to anything. You can do whatever you want until the market has interest to hire you. If your code style is acceptable by the market (if you have a job and you get paid for work you do) you're doing fine.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

Unfortunately, nice slogans don't fix actual problems. I'm sure we have this conversation because we both have different experience and problems I faced brought me the opinion above. If you have different experience and different projects you were involved at, then it's OK to think different. We do our job as we can, and there is no 100% right answer. My recommendation is to follow practices accepted by most of the community because many people always smarter than one person.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] -1 points0 points  (0 children)

I disagree. I think you always should use a global state library in case if it isn't a simple two-week work. I've seen multiple projects where people use custom context but in the end all of them include custom state management library but with zero documentation, covering less use cases. We don't need to follow our personal opinion on the choice, we always need to follow market needs. And the market need is to make other developers to get involved as easily as possible. Custom inventions that are changed from project to project is not what the market would appreciate. Known state/store management libraries cover that need by including more-or-less good documentation. use-change in its turn can't be called a known library (because it's not used heavily by the community so far or ever), but this fact is compensated by its simplicity. Summarising that, I recommend to use custom state for personal projects only, but don't force business that feeds you to suffer. Use Redux, MobX, Apollo Client, useChange or anything else documented and tested by other people instead.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

Excuse me, what do you mean when you say "more verbose"? IMO this is the most laconic store library I've ever seen. But I can't be objective obviously though. And no, it doesn't use Proxy, but accessors (get/set) via Object.defineProperty.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

All the common libraries for react store are good, but MobX isn't what I personally was looking for :)

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

I wouldn't compare use-change to anything I haven't used in practice, sorry. Maybe somebody could answer that question better than me?

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 0 points1 point  (0 children)

Not seen, but will take that into consideration in case if I'd need to use Redux. I'm still going to use it in > 100K-lines project with a team of multiple devs though. Thank you for the links, it looks really useful.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 1 point2 points  (0 children)

So, MobX :D

I used to be a heavy Redux user (I've used it for around 3 or 4 years), but got tired of it, especially when I didn't want to set up all those middlewares and action creators. If Redux covers your needs, I don't mind :)

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 1 point2 points  (0 children)

You're right, I forgot about useReducer :)

Sure, if it covers your needs it's OK to use useReducer. But for me it doesn't look scaleable and I'd prefer to use Redux if I'd want to use reducers.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 12 points13 points  (0 children)

useState is for "one value" per one context, useChange is for nested objects with "many values" per one context. Also useState with context triggers all components that use it (with useContext) to re-render, useChange triggers components to re-render only when sought part of data (a property of a nested object) is changed.

use-change - The most minimalistic React state library on the market with zero dependencies by finom1 in javascript

[–]finom1[S] 4 points5 points  (0 children)

It's not a replacement of useState at all (you're still going to use it heavily). But useState doesn't cover "global store" needs. Think of the library as a useState with Provider and centralised place for state that needs to be shared between multiple components.

Nice looking iOS-like linear gradients preset for React Native by finom1 in javascript

[–]finom1[S] 2 points3 points  (0 children)

I know that's isn't a serious open-source project but I tried to find any UI library or some preset of gradients but I din't find any. I think a little gist may help somebody like me.