-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
Embrace DOM-like structure #27
Comments
👍 |
2 similar comments
👍 |
+1 |
Yes, I think we'd definitely like to go in this direction. We'll work this into the next release or 2. |
H |
Maybe you could keep both. For menus and navigation, where the structure is well known, I think it makes sense to make it more of a configuration. If I want to quickly implement a menu I don't want to import/remember all of the sub menu components. Wouldn't a simple if statement allow for overrides, though. Something like: if (this.props.children) {
return this.props.children;
} else {
// Build it using the config
} |
@kylefinley are you looking to have the config so you don't have to recreate the same jsx over and over again? If so, how are you doing this with the config? Can you just replace that with JSX dom structures? |
Yes, I see your point. I'm new to React, so perhaps my suggestion is not idiomatic. But the thing I like about the current implementation, and React for that matter, is that it feels more like JavaScript than HTML. Instead of using JSX, or even nested React functions; Material-UI simply uses JavaScript data structure (Objects and Arrays) to define the structure, E.g. Menus At the end of the day it's just personal preference. I just though that the use of |
@kylefinley I feel you. One of the things that using react also does though is let your templates and your js merge so that your typical html/css devs work on end product and not just mocks. |
Has there be any updates in this regard? I'm very interested in this. |
+1 |
#1319 |
…ection contains ALL libraries that are required for the server runtime. The "devDependencies" section contains the libraries required for building the project. Fixes mui#27
Right now subcomponents are passed as a list of special objects to some specific prop, like there:
I'd argue it would be much more composable and extensible to reworking API to have something like this:
The same for all menus.
The text was updated successfully, but these errors were encountered: