GithubHelp home page GithubHelp logo

vergegroup / swift-verge Goto Github PK

View Code? Open in Web Editor NEW
619.0 12.0 33.0 78.1 MB

🟣 A robust Swift state-management framework designed for complex applications, featuring an integrated ORM for efficient data handling.

Home Page: https://swiftpackageindex.com/VergeGroup/swift-Verge/main/documentation/verge

License: MIT License

Swift 99.92% Objective-C 0.08%
flux redux ios swift mvvm rxswift swiftui vuex store-pattern state-tree

swift-verge's People

Contributors

aymenworks avatar dependabot[bot] avatar jordanekay avatar k-kohey avatar kenjitayama avatar mironal avatar muukii avatar ntnmrndn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swift-verge's Issues

Changes performance

The Changes contains new value and old value to get the boolean value that indicates if the property has been updated.
If the value struct is a large structure, deallocation will take many CPU usages.

History

[hasChanges]

image

Even if empty function does nothin, hashChanges is true. Why is that? I made the derived pipeline type memoized, still it has no effects. I also set counter the same value, hasChanges again true.

[On Verge-Orm]

I did not understan why we need Verge Orm? Which case should we add to our project? Can you give some use cases for understanding? I think, in Verge we really do not normalizaton stuff like in Mobx. Am ı wrong?

[commit function]

Hi again,
I explored all the source code of the Verge. I understood that commit function is atomic operation. I thought it was kind of database transaction thing. My question is if any error throws in commit function ,the commit function rollback to old state? Because in db, this kind of thing it's successfuly made or failed.

[Feature] Returns cached chained Derived

Many times to create Derived from .chain
notifying and memorization also have a little bit of cost to perform.
if chaining condition is same, we can return shared derived.

State Type

I am using class as my state. However Verge says, you cannot use class type for state type. Can we make it?

Initializer requires that EventEmitter conform to 'DispatcherType'

Hey there,

I'm trying to use Verge and VergeORM in my application. Right now I have a very small model with a couple entries and I'm trying to list all the entries using SwiftUI:

VStack {
    StoreReader(Pickup.shared.store) { state in
        VStack {
            ForEach(state.database.entities.home.allEntities()) { home in
                Text("\(home.rawID)")
            }
        }
    }
}

But on the StoreReader line, I get the following error:
Initializer 'init(debug:_:content:)' requires that 'EventEmitter<_StoreEvent<State, Never>>' conform to 'DispatcherType'

This seems to only happen if I add the ForEach block. Let me know if there's another way I should be doing this :~)

swift _read yield

I see _read yield used in the code 。 Now I'm a little confused what does that mean

Performance

You refer store object even though it's used only for dispatching action. Does it bring extra performance loss since any change in store will trigger view re-rendering? If yes, what is the good way to minimize this kind of loss?

struct MyView: View {

  let store: MyStore

  var body: some View {
    UseState(store) { state in
      Text(state.name)
      Button(action: {
        self.store.myAction()
      }) {
        Text("Action")
      }
    }
  }
}

[Bounty] Creates beautiful demo application

SwiftUI or UIKit based application.

Verge needs an app that represents how Verge works in state-management.
What's type of application is not specified.

Something like SNS would be good, like Spotify, Unsplash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.