Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Braden Napier
    @bradennapier
    it should be localized - especially when dealing with layers
    if a bunch of components can control it and components can be rendered in multiple places all the sudden you have tons of hard to debug situations
    instead you can control at the Layer (show={true}) or at the OnLayer (show={true})
    multiple OnLayers can render onto Layer
    so you can hide all from the Layer or hide specific from the OnLayer
    Alexey
    @fckt
    the problem with your solution is that you have the local state
    Braden Napier
    @bradennapier
    only to show it in a single environment
    not needed at all
    can easily use redux -- just dont force it
    I use my redux-saga-process library by example
    Alexey
    @fckt
    redux is overhyped
    Braden Napier
    @bradennapier
    export default class ModalProcess extends Process {
    
      static config = { reduces: 'modals', ssr: false };
    
      static initialState = { 
        open:  undefined,
        props: {}
      };
    
      static reducer = {
        modalShow: (state, action) => ({
          ...state,
          open: action.id,
          props: action.props || {}
        }),
        modalClose: (state, action) => ({
          ...state,
          open:  undefined,
          props: {}
        })
      };
    
    }
    that builds a reducer called "modals" that is ignored on server side
    initial stat eof reducer is open and props
    and the reducer itself when MODAL_SHOW and MODAL_CLOSE are received
    Alexey
    @fckt
    why do you think your solution is better then react-portals?
    Braden Napier
    @bradennapier
    easy, modular
    i liked your argument that attaching to the DOM adds unnecessary complications and complexity
    I liked the layer concept
    so its kind of a fusion of both
    I also wanted it to be more lightweight - RLP is super super tiny
    not saying its better or worse in any way either
    but i will say https://github.com/Dash-OS/redux-saga-process this has changed our apps completely
    this pattern is an amazing productivity booster and they copy and paste into any app for the most part
    Alexey
    @fckt
    I'm not a fan, personally
    even more, I'm not a fan of redux itself
    Braden Napier
    @bradennapier
    yes seems a lot of people like to have 10 files for every little thing they want to do
    when it takes me 15 minutes to model a concept and another 15 in each app it simply isnt a good situation
    Alexey
    @fckt
    redux could be used as a backend. But to much action types leads to hell
    Braden Napier
    @bradennapier
    then by definition you would like saga-process
    that is one of the biggest benefits
    1. Handle logic to make your store only update with data that should update the UI, leave everything else internal to the process
    1. Handle async (obvi)
    err stupid numbering
    Alexey
    @fckt
    dont sell me it ) I'm from the different boat )
    I prefer the clojurescript way better
    datascript ect.
    to store the shared domain state
    Braden Napier
    @bradennapier
    have you tried MobX
    i like it more than redux i think but havent had time to learn enough to start using it
    Alexey
    @fckt
    I dont like it
    I do like datalog and normalized shared knowledge
    and not the hipsters shit
    Braden Napier
    @bradennapier
    never used datascript
    Alexey
    @fckt
    definitely deserves
    to take a look on
    John Sourcer
    @sorCrer
    Hey Alexey, love what you're doing here although I need to go through the code in depth. 2 Quick questions. How do you set zIndex on a layer? Can you show a layer dynamically without LayerToggle?
    Alexey
    @fckt

    @sorCrer sorry, I've missed the message due to inactivity ( .

    How do you set zIndex on a layer?

    you can see here, how it works: https://github.com/fckt/react-layer-stack/blob/master/demo/src/Demo.js#L118

    Can you show a layer dynamically without LayerToggle?

    what do you mean? You can show in initially https://github.com/fckt/react-layer-stack/blob/master/demo/src/Demo.js#L210

    Abhishiv Saxena
    @abhishiv
    Hey guys, hast any one has tried react-layer-stack with react16 fiber?
    Alexey
    @fckt
    I’m not..