Currently I’m using the following to load my local stylesheet
app = dash.Dash(__name__ , static_folder='static')
app.layout = html.Div(className='container', children=[
/assets folder as described here
static_folder is the main
static_folder argument given to the Flask instance, it is only kept in dash for backward compatibility. Only the assets folder have their
js/css files automatically served on the dash index.
Ok thanks for explaining!
Out of curiosity, was this simply a convenience feature (i.e automatic loading and eliminating the need to create the
html.Link) or are there other benefit out of using the assets folder pattern?
It eliminate boilerplate code to include css/files on the dash index. Before you had to add them manually to the dash resources. With Hot Reload, if there is modification in the assets folder, it will reload the page/change the loaded css.