Comments (7)
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.
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.
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.
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.
Would adding the missing edge to the child component in the initial-state be a breaking change?
from fulcro.
Try 3.5.18-SNAPSHOT. I've turned off warning for nc components altogether. That do it?
from fulcro.
Fixed in 3.5.18
from fulcro.
Related Issues (20)
- Unnecessary re-rendering HOT 3
- Denormalize should not "detect loop" for leaf entities HOT 2
- Associate a list of components with a different instance of a state machine each HOT 1
- Mutation params are "closed over" on mutation submission, which causes problem in result actions. HOT 9
- `comp/get-query` not correct when using raw component and union query HOT 4
- Fix text area and table examples exploding width HOT 2
- Fulcro 3.6 w/React 18
- http error 404 on github-pages HOT 2
- Fulcro 3.6 use of React Context breaks shouldComponentUpdate optimizations HOT 9
- http-remote :status-code is always 500 on error HOT 6
- Potentially add "Accept: application/transit+json" header. HOT 1
- Potentially omitted :force-root in `schedule-render!` HOT 5
- dr/change-route-relative! -- denied route does not call :route-denied component option HOT 1
- Dependency issue with taoensso.encore/dissoc-in HOT 2
- fs/dirty-fields misses recursive field HOT 1
- Link/ident queries don't work with `false` values
- dynamic routing question HOT 1
- HTTP middleware for making load/mutations work easily with JSON http APIs.
- Hook-based defsc should also have their parent set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fulcro.