Fork me on GitHub

i'm trying to implement this very basic example of using

import React from 'react';
import {LightTheme} from 'baseui';
import { Button } from "baseui/button";

 export default function App() {
  return (
    <ThemeProvider theme={LightTheme}>
      I can use themed Base Web components here!
with reagent:
(ns app.view
  (:require ["baseui" :refer [LightTheme ThemeProvider]]
            ["baseui/button" :refer [Button]]))

(defn app []
  [:> ThemeProvider {:theme LightTheme}
   "I can use themed Base Web components here!"
   [:> Button "Hello"]])
everything compiles fine, and i see the Button component as a button, but the theme LightTheme should be applied to all descendant components of ThemeProvider which is not happening. can anyone spot something wrong with my syntax before i continue digging into BaseUI itself?


This may be a simple question that has been addressed before, but I'm having trouble finding an answer online. Is it safe to deref a reagent atom or reaction outside of a component? I know there are concerns with using re-frame subscriptions outside components and that causing a memory leak, but I think that is specific to the re-frame subscription caching. Are there similar concerns for plain reagent atoms?


AFAIK it's fine. There are specific checks for that.

🙏 3