Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Rudy Ges
    @kLabz
    Hmm let me check that
    Kaspars Jaudzems
    @kasparsj
    the error that I'm getting says: String should be Null<css.Properties>
    that's when using a classname from withStyles wrap
    Rudy Ges
    @kLabz
    I found what's going wrong
    Damn cache, always at fault :D
    I'll release a fix soon
    Kaspars Jaudzems
    @kasparsj
    great! thanks very much :))
    Rudy Ges
    @kLabz
    What version of react-types do you have?
    Kaspars Jaudzems
    @kasparsj
    0.10.0
    Rudy Ges
    @kLabz
    0.10.1 should have fixed this 5 weeks ago actually
    I was writing the same fix again (I didn't have it here either xD)
    Kaspars Jaudzems
    @kasparsj
    OK, will update
    yep, updating to 0.10.1 fixed it. nice!
    Rudy Ges
    @kLabz
    :+1:
    Axel Huizinga
    @axelhuizinga
    after upgrading to 1.120 I get A react component must be a direct child of either ReactComponent or PureComponent - why this?
    Rudy Ges
    @kLabz
    Because it was already the case but not enforced and was hiding bugs
    React components use composition, not inheritance
    What's your use case?
    Axel Huizinga
    @axelhuizinga
    I have a BaseForm class as a foundation for many forms in my app with functions and initializers used across the subclasses
    Axel Huizinga
    @axelhuizinga
    From the docs: React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components.
    So it's not forbidden :)
    Rudy Ges
    @kLabz
    You can add -D react_skip_extend_component_restriction then
    It's still not recommended in reactjs and the behavior is not defined in haxe-react (well mostly in react-next)
    It might not work any more in the future
    Axel Huizinga
    @axelhuizinga
    Looking at the docs a little more at least revealed how I can avoid this pattern and still provide shared functions in an extra module
    Axel Huizinga
    @axelhuizinga
        override public function render()
        {
            return jsx('
                <Tabs className="is-centered" >                
                    ${buildNav()}
                </Tabs>        
            ');
        }        
    
        function buildNav()
        {
            var userState = App.store.getState().userState;
            //trace(userState);
            if (userState.waiting || userState.dbUser.id == 0|| userState.dbUser.jwt == null || userState.dbUser.jwt == '')
            {
                // WE REQUIRE TO LOGIN FIRST
                return null;
            }
            else        
            return jsx('
            <>
                <$TabLink to="/DashBoard" ${...props}>DashBoard</$TabLink> 
                <$TabLink to="/Data" ${...props}>Daten</$TabLink>            
                <$TabLink to="/Accounting" ${...props}>Buchhaltung</$TabLink>
                <$TabLink to="/Reports" ${...props}>Berichte</$TabLink>
                <i className = "icon abs-right fa fa-sign-out"  title = "Abmelden"  onClick=${logOut}
                style={{margin:".8rem .5rem",fontSize:"1.7rem", cursor:"pointer", color:"#801111"}}></i>
            </>
            ');
        }
    this compiles and runs well but recently I get this diagnostic warning at the ${buildNav()} in the render function
    Incompatible class for ReactType: expected a ReactComponent or a @:jsxStatic component
    How can I solve this
    Rudy Ges
    @kLabz
    Diagnostics give false warnings sometimes
    Maybe typing buildNav explicitly as ReactFragment would help
    Axel Huizinga
    @axelhuizinga
    nope - I'll ignore it - can you tell me what's wrong here: while using some tab links with a Location as to prop trying to access it fails with
    haxe.extern.EitherType<String, history.Location> has no field pathname
    (doesn't compile) but should since history.Location has a pathname
    Juraj Kirchheim
    @back2dos
    but what if it's a String?
    Axel Huizinga
    @axelhuizinga
    I access it this way: (4now fixed with untyped) var toCheck:String = (Type.typeof(props.to)==TObject?untyped props.to.pathname:props.to);
    Axel Huizinga
    @axelhuizinga

    in my new app with this as root element:

                <$Provider store={store}>
                    <$DrawingMap userState=${state.userState}/>
                </$Provider>

    I can't find why I get the following error:
    Error: Could not find "store" in the context of "Connect(DrawingMap)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(DrawingMap) in connect options. connectAdvanced.js:245

    Rudy Ges
    @kLabz
    Wrong reduxjs version
    Should be downgraded to uh something below 7 iirc
    React-redux version *
    Axel Huizinga
    @axelhuizinga
    ah - ok - thx
    Axel Huizinga
    @axelhuizinga
    6.0.1 gave me the same error but 5.1.1 works
    Rudy Ges
    @kLabz
    Does anyone work with external jsx files + ReactMacro.jsx?
    Juraj Kirchheim
    @back2dos
    what's that? ^^
    via the imports handled in tink_hxx?
    anyway ... I have a question regarding react/react-next and Haxe 3 ... I would like to switch to Haxe 4 for a whole number of reasons ^^
    Juraj Kirchheim
    @back2dos
    with react-next using part of tink, I could keep those libs Haxe 3 compatible ... my question would be: is it worth it?
    I see that react-next still supports haxe 3.4.4 (at least CI-wise)
    so I'm kinda wondering whether 1) there are plans to bring the projects back together and 2) how much each of you holds on to Haxe 3?
    Emugel
    @emugel
    Personally even tho I can be quite conservative I don’t hold to haxe 3, because haxe 4 works better than anticipated (and no painful migration).
    Rudy Ges
    @kLabz
    My view on this is as long as it's not too much trouble I might as well keep supporting haxe 3
    If you have good reasons to drop it, then I guess I'd be happy to have an excuse to stop worrying about it x)
    I'm not even sure anyone is using react-next with haxe < 4
    Thomas Fétiveau
    @zabojad
    I am :p
    Axel Huizinga
    @axelhuizinga
    Is there any example of server side rendering react with haxe?
    Philippe
    @elsassph
    I had started a sample project but it's tricky: you need to have a node server and there's a million options.
    Axel Huizinga
    @axelhuizinga

    Recently I see this kind of warnings - do we have to change the function names in ReactComponent.hx?
    Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

    • Move data fetching code or side effects to componentDidUpdate.
    • Rename componentWillUpdate to UNSAFEcomponentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder.

    Please update the following components: Connect(UiView)

    Vladimir Cores
    @dqvsra_twitter
    Hey! Whats up people? : )