Open exapsy opened 7 years ago
This is a good library. We all understand that most OSS projects are not bread earners and it can hard to find time for them. I urge the owners to transfer it to the community so that we don't see this go to a waste.
@tonyhb
@mrchief There are other great libraries though. Try https://github.com/erikras/redux-form if you're currently searching for one. Since that one has ... no pulse.
@Eksapsy I use redux-form but that and this one are for completely different purposes. redux-form is a not a state management library unless I missed something.
@Eksapsy going to give jasonmorita/react-redux-ui-state a shot except some stripped out features like passing a reducer to hoc it looks very similar to redux-ui
UPD and... it doesn't expose actions (of course there is an option to create bound to dispatch set of actions, but...)
@amok Keep us posted please!
@mrchief I finally ended up writing this little bicycle
import { get } from 'lodash'
import { map } from 'redux-data-structures'
import { connect } from 'react-redux'
import { createAction } from 'redux-actions'
import { compose, lifecycle } from 'recompose'
export const STATE_KEY = 'rui'
export const UPDATE = '@@UI/UPDATE'
export const CREATE = '@@UI/CREATE'
export const REMOVE = '@@UI/remove'
const meta = name => ({ name })
const payload = (name, opts) => opts
const toUIState = (f, p) => typeof f === 'function' ? f(p) : f
export const update = createAction(UPDATE, payload, meta)
export const create = createAction(CREATE, payload, meta)
export const remove = createAction(REMOVE, payload, meta)
export const reducer = map({
keyGetter: action => get(action, 'meta.name'),
itemModifier: (item, action) => ({ ...item, ...action.payload }),
addActionTypes: [CREATE],
changeActionTypes: [UPDATE],
removeActionTypes: [REMOVE]
})
export const withUIState = ({ name, state }) => compose(
connect(
(state, ownProps) => ({
ui: get(state, `${STATE_KEY}.byId.${name}`) || toUIState(state, ownProps)
}),
{
setUI: vals => update(name, vals),
createUI: vals => create(name, vals)
}
),
lifecycle({
componentDidMount () {
this.props.createUI(toUIState(state, this.props))
}
})
)
(will add "clear on unmount" and other stuff later)
so... nothing to report about :)
my hope is that @tonyhb will get back to maintaining this project
@amok I've resisted writing that bicycle in the hope that @tonyhb returns. But I think I'll take ur bike in the short term. :)
Trying to get this moving again, since it serves my purposes at work.
While waiting on @tonyhb, feel free to check out my fork.
Notable changes in the fork include reviewing/merging the pull requests that have piled up here and removing the run-time dependency on Immutable.JS.
EDIT: Changed link to reflect package name change in npm
@jhorowitz-firedrum Thanks for keeping the flame alive!
I was almost about to get rid of it but looks like I don't have to (since you got rid of ImmutbaleJS as well)!
I'm not sure why @tonyhb has gone complete radio silence on this project. It seems like he's really active on github. Not sure why he isn't responding to offers to help maintain the project. I have created my own fork as well, and I'm considering doing a bit of a rewrite of it to make it do some things I need it to do. https://github.com/hedgerh/redux-fui
I'm trying to use it at Kroger. Maybe we could discuss creating an org for a fork? It'd be great if @tonyhb were willing to move this project to an org. Otherwise, I may create a kroger fork on our internal npm or something.
The features we need on my project:
state.ui
RESET_UI
action to reset to default UI. Would be interested in seeing an easy way to update UI state like this without custom reducers or needing to pass the ui keys along to my sagas or something.@hedgerh Take a look at @jhorowitz-firedrum's fork. I think he's unofficially taken over this project. I think creating an org might be a good idea. Everyone forking and going their own ways (they still can if they strongly feel so) doesn't sound like a productive roadmap to me.
I'd love to contribute to this library anyway I can.
Yeah I definitely think @jhorowitz-firedrum has put more work into his than mine. My changes are pretty small and could be added on top of his fork. @jhorowitz-firedrum, would you be interested in moving your fork into an org?
also, i don't dislike the package name react-redux-ui-tools
, but it's a little lengthy. i named mine redux-fui
(f for fork), which isn't the best name either, but your fork can have my fork's name if you'd like. im fine with any name, but just thought i'd offer.
Sounds good to me @hedgerh, the more help the better :)
Invite to collaborate sent. :+1:
As far as the name, while I agree it is lengthy I figure react-redux specific packages should start with react-redux-. I'm open to changing the latter part, but unfortunately react-redux-ui was taken on npm :(
@jhorowitz-firedrum Note that this has nothing to do react. Just like redux has nothing to do with react. And we can ask npm folks to release redux-ui tag as the author is not active. It'll take some time but we may get it.
@mrchief the package depends on react at runtime; it is essentially a react HOC package with a set of convenience props and a reducer which leverages redux.
Yes you're right. I forgot about the HOC part.
Hey @amok I randomly ran across your comment here today. My lib is still being used by my former team and whomever else uses it out there in userland, there just haven't been any issues reported lately, but the repo is active (https://www.npmjs.com/package/react-redux-ui-state).
I would love feedback from any of you who have used the package. It solved a lot of problems for us.
If there are missing features, please make a PR. We found this gave us all we needed for our app's needs, which is what it's pretty simple.
Thanks!
I think it is dead
I think it is dead
Oh well, the world needs a hooks version of this anyway!
Hey guys. Yeah, this is dead. I would strongly recommend using hooks
(useState
and useContext
) to provide UI for components. This library
adds additional complexity that you no longer need. Yay.
On Tue, Feb 19, 2019 at 7:26 AM Hrusikesh Panda notifications@github.com wrote:
I think it is dead
Oh well, the world needs a hooks version of this anyway!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tonyhb/redux-ui/issues/84#issuecomment-465175647, or mute the thread https://github.com/notifications/unsubscribe-auth/AASsAZGSZkqfHzaqXqohdNmsb1Hqy8Pwks5vPBeqgaJpZM4PthvB .
I would like to use it in some cases, but if the community and the administrator are inactive I won't do such thing.
As I see the newest issue was on 3rd of August and it wasn't even answered. The last answered by the Administrator of this repository was on May 16.
So, what is going on?