Leaflet: How to make lines follow "cluster" property?

I’m plotting a bunch of points on a map, connected by lines.

I have the ‘cluster’ property set on the GeoJSON property, but the lines are each a Polyline appended to the children of the Map.

So while the points are nicely clustered, I still see all the lines before any zooming.

Is there a way to cluster the lines as well?

maybe look into breaking it into dl.LayerGroup 's

for example I have this setup for a fema map i’ve been working on:

dl.Map(
                                children=[
                                    dl.TileLayer(id="base-tile-layer"),
                                    *[
                                        dl.GeoJSON(
                                            data=geojson_data,
                                            id=f"{state}-counties-layer",
                                            hideout=dict(selected=[]),
                                            style=style_handler
                                        ) for state, geojson_data in state_geojson_data.items()
                                    ],
                                    *[
                                        dl.LayerGroup(id=f"map-markers-{incident_type.lower().replace(' ', '-')}",
                                                      children=[])
                                        for incident_type in DEFAULT_INCIDENT_TYPES if incident_type != 'All'
                                    ]
                                ],
                                id='disaster-map',
                                style={'width': '100%', 'height': '80vh', 'zIndex': 0},
                                center=[31.0686, -99.9018],
                                zoom=6,
                            )

I was running into trouble trying to change the tooltips based on the selection of fema declaration, so I just created a dl.LayerGroup for each fema event and hid/show which dl.LayerGroup instead of trying to use the same dl.LayerGroup with re-rendering the data. Preformed much better for my use case, not specific to matching with the Polyline but it is something worth considering in trying to figure out a solution

Thanks!

What I ended up just using the map ‘bounds’ state and calculating the distance spanned by the map, and then clustering or not clustering based on that.