redux
swift-composable-architecture
Our great sponsors
redux | swift-composable-architecture | |
---|---|---|
190 | 40 | |
58,318 | 6,410 | |
0.3% | 2.7% | |
8.9 | 9.2 | |
about 9 hours ago | 1 day ago | |
TypeScript | Swift | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
redux
-
State management on backend for VSCode LSP extension
If you like Redux, you should be able to use it on the backend just fine. You will want to use the Redux library directly, as opposed to the react-redux bindings you are probably used to.
-
React seems very flawed
All your problems can be fixed with redux, the new redux toolkit is amazing for loading data asynchronously, it decouples the data fetching logic from your components and you can also have nested states. Try it out! redux.js.orgRedux Website
-
Component Breakdown & State Management ⚙ - Building a tic-tac-toe game with React from scratch
React applications work with data that may frequently change and the UI needs to update in respond to these changes. Such data is called state, and it can be stored either in the global scope, where it is accessible to all components, or in the component scope, where it is accessible to only a single component and optionally its children. State management libraries like Redux allow us to store data in the global scope and write methods to access and change it.
-
Discovering the front-end and React
State is data that is created within the component and used only inside it. It is supposed to represent the actual state of the component in a given moment. For example, whether a button is clickable or not. Managing state is one of the biggest challenges in front-end projects. Complex applications have several pieces of state and sometimes managing it requires help from other libraries, like Redux, or even React’s own Context API.
-
What is XState used for?
replace global state managers like Redux or Vuex
-
Redux Best Practices
Redux is a library used for global state management, meaning if you have a piece of state that you want to access in different places of your app, you can use Redux to manage that state and make it easily accessible anywhere. The global state can be anything from logged-in user information to UI state such as theme, etc.
-
How to use React with Redux
Now go ahead and import createSlice from the same library and create a reducer with it. createSlice is a wrapper around the old API from redux which reduces quite some boilerplate when creating reducers.
-
Prevent Acid Redux with Redux Toolkit
This post is going to help you get rid of the acid Redux associated with trying to use vanilla Redux.
- React - Clean Architecture - Redux Toolkit
-
Tech Explained - a low-level primer on frontend technology
Redux Docs
swift-composable-architecture
-
SwiftUI for Mac 2022
If you're interested in SwiftUI and care about feature composability, decent test coverage, dependency injection, isolated side effects, functional core and being able to use live previews properly, take a look at: https://github.com/pointfreeco/swift-composable-architecture
Been using it at work for a moderately complex app (not a toy app by any means) and it's been fantastic. We're 7 months in and haven't hit any gotchas, but the learning curve can be a bit steep, especially for more junior iOS devs.
Helps that they have a full video series taking you through the library and how they built it: https://www.pointfree.co/collections/composable-architecture
-
Stop using MVVM for SwiftUI
In terms of balancing testing power, maintainability and ergonomics (mostly), I've found The Composable Architecture to be the best for more serious applications.
- Improving when you are the only iOS developer
-
Need Help With Project Architecture
Have you ever tried the compose me architecture by pointfree ? https://www.pointfree.co/collections/composable-architecture
-
MVI in Playtomic mobile app
We spent some time analysing some of the most popular reactive architectures: MVVM, MVI and TCA. Without getting into much detail of our decision making (it would take a full post), we decided that MVI was the best fitting for our project. With it, we could get better separation of concerns and state management than in MVVM, unidirectional data flow, single source of truth and easy of testing, without the additional complexity added by TCA.
-
SwiftUI in 2022
One point that's not being discussed enough -- using SwiftUI (since it's heavily value-typed / struct-based) prevents a whole host of problems around retain cycles, typically the bugbear of iOS dev. I recently built an iOS app from scratch with recent grads with zero Swift experience (but had done React).
It was ~2mo before they even had to learn what a retain cycle was, and that was from using UIKit.
Of course you still eventually see this if / when you use `@ObservedObjects` and their implementation, but in our case we were also using https://github.com/pointfreeco/swift-composable-architecture which hides this away as well.
-
Is MVVM the only architecture you’ve used when developing iOS app?
There’s a nice open source swift library by the pointfree guys, called The Composable Architecture (TCA). Check it out 🙂
-
I would like your feedback on my attempt to improve the MVVM pattern.
It looks like you reinvented the Reducer pattern, have you had a look at Composable Architecture?
-
Ask HN: Book Recommendation for macOS Development
[Books by Objc.io](https://www.objc.io/books/) are great. Also whilst not a book, [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture) seems like a nice way to develop cross platform (iOS/macOS) apps.
-
iOS development best practices in 2022
Regarding MVVM, since your list is very SwiftUI-forward (which is great) I’m surprised that the Composable Architecture pattern was not mentioned. (https://github.com/pointfreeco/swift-composable-architecture)
What are some alternatives?
zustand - 🐻 Bear necessities for state management in React
Clean Architecture for SwiftUI + Combine - SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
valtio - 💊 Valtio makes proxy-state simple for React and Vanilla
react-query - 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
SWR - React Hooks for Data Fetching
tca-swiftui-navigation-demo - Demo project that shows how to implement navigation in SwiftUI iOS application using Swift Composable Architecture
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
effector-react - Business logic with ease ☄️
xstate - State machines and statecharts for the modern web.
TCA-tutorial
iOS-Viper-Architecture - This repository contains a detailed sample app that implements VIPER architecture in iOS using libraries and frameworks like Alamofire, AlamofireImage, PKHUD, CoreData etc.
GRDB.swift - A toolkit for SQLite databases, with a focus on application development