Dash-mantine-components error

I’m trying to use dash-mantine-components with a simple example (welcome example from page). But when running it throws “r.useId is not a function” error.

here my code:

import dash_mantine_components as dmc
from dash import Dash

app = Dash(__name__)

app.layout = dmc.MantineProvider(
    dmc.Alert(
       "Hi from Dash Mantine Components. You can create some great looking dashboards using me!",
       title="Welcome!",
       color="violet",
    )
)

if __name__ == "__main__":
    app.run_server(debug=True)

here’s my dash installed ( pip freeze | grep dash ):

dash==2.16.1
dash-bootstrap-components==1.4.2
dash-bootstrap-templates==1.0.8
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-mantine-components==0.14.0
dash-table==5.0.0

Dash mantine was update just two days ago, with the update a decent amount of changes where made but those changes haven’t been reflected in the documentation just yet so your bound to run into a range of issues when developing based off the newest version at this moment without a great amount of expertise in the dash-mantine-components and react-mantine-components libraries.

My suggestion is to downgrade the package with a pip install dash-mantine-components==0.12.1 or pip install dash-mantine-components==0.13.0a2, the code you’ve included will run just fine then and anything you build from referencing https://www.dash-mantine-components.com/ will work without problem.

If you really want to play around with the new 0.14.0 you can reference: Version v7.0.0 | Mantine as a bases for understanding the update thats taking place in this moment.

3 Likes

Thanks! i’ll try this and, if it’s works will mak as solved! Just curiosity but, wouldn’t be a goo idea to add to documentation the corresponding version used in the example?

From my understanding, dash-mantane-components is currently panning an overhaul in regards to documentation. Specifically, It sounds like the goal is to setup the documentation based on being able to switch documentation by version so you can reference. Its just a large project for one to maintain and update, what @snehilvj has created in the package is impressive and I’ve seen consistent improvements over time. Its fairly polished, just constantly changing and getting better every day, so just give it some time. I’d also recommend to always check out the associated github repo of any component and doing a brief overview as you’ll usually be able to catch important updates and context from referencing both the documentation and the github.

4 Likes

You’re right! dmc is a great work!

I’m now on dash_mantine_components==0.14.3
and I still get the Error “r.useId is not a function”

I would like to start porting my app to 0.14.x but I’ve not had any success so far. Any suggestions?

Hello @solenostomus,

Welcome to the community!

Check out here for instructions on how to run 0.14.3+ of dmc.