-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a default render function that renders null for components #17
Comments
Isn't renderless components ones that returns content from scoped slots? They still do need the render function to do their jobs. I can't think of a case where a component without render/template would make sense. |
I agree with Evan here, I know the term referring to components that render a scoped slot, and usually no markup of their own. They only provide functionality through the slot props and don't render any markup of their own. The term is not perfect and I think it was coined by the React community when using renderProps / a function as |
I also think the term doesn't completely fit those components. Regarding removing render, I think, it's almost never done except for components having side effects, so it's better to not have it by default. Usually people writing these kind of components do have a very advanced knowledge on Vue |
@yyx990803 @LinusBorg @posva I think you're thinking of "container" components, but I'm referring to components that use the <MapboxMap>
<MapboxMarkers :items="cities" />
<MapboxNavigation />
</MapboxMap> This map uses WebGL, so |
@chrisvfritz I think most cases a component need a render function. Sometimes developers may get mistakes to miss a valid |
That works for me. 🙂 I don't have any further arguments, so I'll close. |
Right now, the pattern that's been called "renderless components" doesn't make complete sense, because technically, those components still need a render function that just returns
null
:What are thoughts on removing the need for either a template or render function in components, by default rendering
null
?The text was updated successfully, but these errors were encountered: