Hey everyone,
I am developing some applications, Python packages, and planning to open-source these codes. But I am confused about syntax, mostly about “children”, which one is more clean and readable for you? Is there a standard that I can utilize from?
Code 1:
navbar = dbc.Navbar([
html.A(
dbc.Row([
dbc.Col(html.Img(src=CEPEL_LOGO, id="cepel-logo")),
], align="center", no_gutters=True)
),
dbc.NavbarToggler(id="navbar-toggler"),
dbc.Collapse(
dbc.Nav([
dbc.NavItem(dbc.NavLink("Page 1", href="#")),
]),
id="navbar-collapse",
navbar=True
)
]),
Code 2:
navbar = dbc.Navbar(
[
html.A(
dbc.Row(
[
dbc.Col(html.Img(src=CEPEL_LOGO, id="cepel-logo")),
],
align="center",
no_gutters=True,
),
href="https://plot.ly",
),
dbc.NavbarToggler(id="navbar-toggler"),
dbc.Collapse(
dbc.Nav(
[
dbc.NavItem(dbc.NavLink("Page 1", href="#")),
#nav_item_about,
#nav_item_github
], className="ml-auto", navbar=True
),
id="navbar-collapse",
navbar=True,
),
],