kea
kea copied to clipboard
Who's using Kea?
Hey, just curious to know and to start collecting data for a future "projects" page: who's using Kea in the real world? :)
Please share:
- Company or product name + link to your website
- Logo
- What kind of project? How big is your team? How big is your codebase?
- Any other comments? :)
- Can I use this logo on the homepage... or you need to ask legal fist... or not at all?
I'll start:
- Apprentus
-
- Apprentus is a marketplace for private lessons. Currently developed by just me. I found ~30
kea({})
calls and 112@connect({})
calls in the codebase :). - π€
I'm curious how this is turning out for you @mariusandra. I'm struggling to wrap my head around coupling a redux "duck" to a component. I feel in most cases, i'm using it with multiple components which brings me back to square one, having it separate.
@DarrylD I mostly have one big "logic.js" file per scene, occasionally with a "saga.js", which I then @connect
to from my components. This way I have a central place for logic and each component gets what it wants.
Occasionally I "wrap a duck" (or in this case... wrap a parrot π π¦) around a component, but that's usually when I start developing a feature and both the component and logic are still small. When they grow, I separate them into different files. Or if both component and logic stay small, but I need to access the component without the logic or vice versa, I do separate export const logic = kea({})
, export class Foobar extends Component {}
, export default logic(Foobar)
statements... and then I can either @connect
to the logic or use the unconnected Foobar
.
I've found that with Kea I can flexibly move data, logic and components around as needed... any everything just works :).
Not exactly adding my app to list but I might. The "tediousness" of wiring up redux actions and reducers is exactly my feeling, making it as easy to use as setState
is quite a revolutionary thing!
Question: how actively developed is Kea, in that is there plans for big breaking changes in using Kea?
@fungilation Hey, you can see from here the development activity in the repo. In short, I'm working on it actively... and I encourage contributions from everyone!
As of this moment there are no plans for breaking changes in the core of Kea. That means everything regarding actions
, reducers
, selectors
and connect
will remain as they are until v1.0
, whenever that is released.
The only changes I can see are regarding plugins, addons and extensions. There's currently an active discussion on how to go about that (#54). Whatever the outcome there, the end-user API of the plugins themselves (like kea-thunk
or kea-saga
) should not be affected. The only changes might be internal.
So it's pretty stable.
Feel free to add your app to this list when you can. It seems like the issue went a bit off topic :).
I'm using Kea in my current company, Ajar (https://www.ajar.com.kw), but the app is still not accessible to unregistered users.
In my case, I wrap up my logic in a so called "Controller" files (eg, if I have a user
view, I create an associated userController
with the kea logic in it). Also, I wire up additional shared logic from files called "Modules", where I have common things like reference data, authentication, and even some routing stuff.
Kea has really improved my work with Redux, but I still see room for improvements, like an easier way to extend
functionality. For example, I have som helpers to create forms, grids and so, but sometimes, I would like to add my own reducers, and custom logic. I won't get into details, but to do so I have to do some tricky things, specially with the selectors, as the order of definition matters.
It would be nice to add some .ts definitions too, for people working with Typescript. And some documentation clarifications as to what to do with key
property, and when to use it. For really understanding what it does, I had to do a search in google by site:https://kea.js.org key
and read the "counter-dynamic" example, because it was not really well explained in the API docs.
Besides that and some specific small performance issues at the beginning, it has really made my life easier and would very like to continue contributing on the project, now I feel like I like Redux again.
Keep up the good work π and thanks
Hey @xantorres! Thank you for the comments! And great to hear that Kea is making your life easier! :)
I added a link to the "counter-dynamic" example in the component api docs where the key is mentioned.
I agree that there should be a nicer way to extend components... and it appears you already found the issue where to discuss it :).
Hey @mariusandra I used Kea to manage state-based audio and trigger Greensock animations for a bells and whistles concept demo at Smart Pension:
https://www.smartpension.co.uk/innovation/platform/interactive-statement/
Planning to use it for ALL my personal React projects, it's amazing - I find Kea almost easier to use than hooks, and don't get me wrong hooks are awesome - but setting up Kea is so simple and intuitive.
π₯The best bit has to be how Kea handles form management, something that used to be a horrible experience for most frontenders, has been made so straightforward and almost trivial to achieve.
Such a sane and sensible way to manage state.
Please keep up the awesome work you do β€οΈ π
@lovekaizen thank you for the nice words and I'm happy to hear Kea has been such a great success for you! Your comment made my day! :)
- Elastic is the company and the product we are using Kea on is App Search
-
Logos
- App Search is a UI for Elasticsearch that allows for indesign of search results via an API with a lot of features for those results. We have 3-5 engineers working on the Kea codebase. We use TypeScript and have about 25 logic stores all connected via a parent app logic store
- Absolutely LOVE the library and, as a engineer new to Redux, I found this to be incredibly easy to get up to speed on and it seems to scale very well.
Hi @scottybollinger ! That's really great to hear! π
May I ask you what kind of integration you have between Kea and TS?
I'd love to eventually get full TS support working with Kea, where you could have autocomplete in all the places, including for useValues(logic)
, useActions(logic)
, inside kea({ reducers: ({ actions }) => ({ ... }), selectors => ... })
(to autocomplete the actions while writing reducers... and to autocomplete the selectors when writing selectors), etc.
After working on it myself for a day, I didn't get very far and concluded that such cyclic relationships are either very hard or impossible to add to kea's JS code with TS definitions. I haven't gone back to this issue since.
So I'm just wondering how deep does your integration between Kea and TS go? :)
We aren't using it very deeply at the moment. We create interfaces for the actions(thunks) and values(selectors) and just typecast them when we implement them. Basically it's:
import { IValues, IActions, ComponentLogic } from './logic'
...
const { foo, bar } = useValues(ComponentLogic) as IValues
const { setFoo, deleteBar } = useActions(ComponentLogic) as IActions
Unfortunately, we don't have much type checking in the logic store itself π
-
Logo
-
Our products that are all using keajs: Speki, Muspell CDR
-
We liked this library, now we have well maintained large codebase
We made this mandatory in all the products that we're building and all our team is happy to use it. π