expose MantineHooks and MantineCore for use with custom components#653
expose MantineHooks and MantineCore for use with custom components#653AnnMarieW merged 7 commits intosnehilvj:masterfrom
MantineHooks and MantineCore for use with custom components#653Conversation
|
Once this is placed into the You import like such: This wrapper makes sure that the matine/core is loaded before trying to render. This helps with the lazy loading of the MantineProvider or the component suites being imported at the same time. To avoid config issues, you should make sure that your versions of |
|
Added MantineDates as well. Total bundle size: dash_mantine_components.js (1.01 MiB) |
|
Here is a sample DMC custom component project: https://github.com/AnnMarieW/dmc_custom_components |
|
Sure, this makes sense to me. How confident are you both that core, hooks, and dates are the only pieces people will want to use with this? If there are other big pieces they will request, we'll need a different pattern that somehow forwards chunk requests. |
|
I did try to slow it down, and it seemed to work fine. As far as other imports, I was thinking of wrapping specific (non-exposed to Dash) components to which you could expand and expose more components to the window. You pass the argument to the |
|
Although, we did change the logic from this example, here is the updated version: It waits for the |
|
Hmph it's pretty annoying if everyone who wants to make custom components has to write their own |
|
@AnnMarieW made the boilerplate to start from. 💯 |
|
Thanks for the PR @BSd3v and for the review @alexcjohnson 🎆 |
Closes #641
To utilize in custom components, you need to place this in your
webpack.config.jsexternals: