Coder Social home page Coder Social logo

Comments (7)

awkay avatar awkay commented on June 11, 2024

What do you mean it has initial state? The code you just provided creates a new component, which in fact, does not have initial state...nor is initial state even remotely what you'd want in this case, since such an on-the-fly component is never used in the initial state graph of the application (I mean, you can add initial-state to the options map if you're using this with def and composing it into that tree), but most uses of nc are well after the app initialization when initial state is used. Perhaps you're confusing your terminology and mean something else?

from fulcro.

awkay avatar awkay commented on June 11, 2024

Oh sorry...you're complaining that the warning doesn't take into account that the given component doesn't need initial state? Sorry, not going to fix that. It has a constant ident, and you technically could use it with def and create the problem the warning is talking about.

from fulcro.

MrEbbinghaus avatar MrEbbinghaus commented on June 11, 2024

I would say that it is very confusing when you get a warning about something that might be a problem that you didn't even cause yourself, don't you think?

Maybe the initial-state function of the anonymous component should include initial-state of its edges?
{:car/owner (rc/initial-state <anonymous user component>)}

Or maybe components shouldn't have any implicit initial-state at all?

from fulcro.

awkay avatar awkay commented on June 11, 2024

Hm. That is worth considering. I don't remember what I gave them a default initial state. At this point it would be a breaking change to remove it. So, I think we're stuck with the warning. I guess we could put a marker on nc-built components so the warning could skip them.

from fulcro.

MrEbbinghaus avatar MrEbbinghaus commented on June 11, 2024

Would adding the missing edge to the child component in the initial-state be a breaking change?

from fulcro.

awkay avatar awkay commented on June 11, 2024

Try 3.5.18-SNAPSHOT. I've turned off warning for nc components altogether. That do it?

from fulcro.

awkay avatar awkay commented on June 11, 2024

Fixed in 3.5.18

from fulcro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.