returning null in a view
See original GitHub issueReturning null throws errors, is there a way not to return a root node?
render(vm) {
return vm.state.bool ? <div>foo</div> : null;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:22 (11 by maintainers)
Top Results From Across the Web
View and paramater is returning null in android kotlin
The onCreateView method is supposed to return the view. You are getting null there because using getView before the view is created cant ......
Read more >Hibernate runs query against view but returns null values
I'm using MyEclipse 2020.9.16, Spring 4.1 and Hibernate 4.1. I used reverse engineering to generate DAOs and POJOs against an already existing ...
Read more >Return null values if there is no record for top n selected
I am trying to get the top 'n' rows from the following query: SELECT TOP 1 ImageName FROM (SELECT TOP 5 FROM ClientKeywordMedia...
Read more >Working with SQL NULL values - SQLShack
The IS NULL condition is used to return rows that contain the NULL values in a column and its syntax is like below: ......
Read more >ODBC Driver may return NULL value for some fields
If the "soap_response" view is created/modified, then one of the symptoms may be NULL values being returned. Resolution. On an OOB instance, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
probably the most ergonomic way to achieve a near-equivalent of a
null
return is to return a comment node for the view’s root. this means that the view is effectively unmounted and out of the dom, but is still retained by domvm:ah, ok.
i’ll give this some thought. it’s not a quick fix, but i see how it’s useful and better than create & inject, though i do wonder if that can be made into something similar without modifying the core.
i don’t see anything in https://reacttraining.com/react-router/web/example/basic that can’t be replicated with a bit of js and domvm. this “maintaining view state despite unmounting in a declarative way” seems to be the thorny part.
would be interesting to do a proof of concept with createView, injectView and vm memoization to simulate this. it’s certainly possible, though the ergonomics could be anywhere on the scale from not-too-bad to wtf.