Skip to content

Commit

Permalink
[FIX] set React18 via dash_renderer (#40)
Browse files Browse the repository at this point in the history
* [FIX] set React18 via dash_renderer

- replace direct ENV var setting
  for dash mantine React version
  with the dash_renderer call

Fixes #39

* remove old imports
  • Loading branch information
surchs authored May 28, 2024
1 parent 820ceac commit da57587
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions climate_emotions_map/app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"""Main file to run the Dash app."""

import os

import dash_mantine_components as dmc
from dash import Dash, Input, Output, callback, ctx, no_update
from dash import Dash, Input, Output, callback, ctx, , _dash_renderer, no_update

from . import utility as utils
from .data_loader import NATIONAL_SAMPLE_SIZE, SURVEY_DATA
Expand All @@ -14,7 +12,7 @@
from .utility import DEFAULT_QUESTION # IMPACT_COLORMAP,; OPINION_COLORMAP,

# Currently needed by DMC, https://www.dash-mantine-components.com/getting-started#simple-usage
os.environ["REACT_VERSION"] = "18.2.0"
_dash_renderer._set_react_version("18.2.0")

app = Dash(
__name__,
Expand Down

0 comments on commit da57587

Please sign in to comment.