Fork me on GitHub
#re-frame
<
2021-10-30
>
rberger01:10:40

Is there a way to make it so re-frame-10x does NOT expand out automatically on loading a page that has it enabled? Normally its not a problem, but when debugging on a phone its a super pain since there is no way (that I know of) to do a CTL-H to close it and the expand button is usually hidden because of the phone form factor.

emccue02:10:40

We have the same problem and our stopgap has been to just disable it when we do mobile builds

emccue02:10:23

Somewhat on the radar to make a more specialized tool for what we do, but frankly just using a git dep and flipping the bool for yourself might be the play

DenisMc22:10:55

Hi, I’m looking to integrate auth0 with a re-frame app that I’m building, but I’m still quite new to both cljs and re-frame so am struggling with the fundamentals. The integration I’m trying to incorporate is at https://auth0.com/docs/quickstart/spa/react/01-login; as part of that example I need to re-implement the following js code: import React from "react"; import { useAuth0 } from "@auth0/auth0-react"; const LoginButton = () => { const { loginWithRedirect } = useAuth0(); return <button onClick={() => loginWithRedirect()}>Log In</button>; }; export default LoginButton; I’m struggling with how to convert this to re-frame code; I konw the onClick on the button should be a dispatch to an event (which is fine, but I just can’t get the useAuth0() function to display the auth0 login form as expected. Any pointers would be gratefully appreciated. Auth0 Docs https://auth0.com/docs/quickstart/spa/react/01-login Auth0 allows you to add authentication to your React application quickly and to gain access to user profile information. This guide demonstrates how to integrate Auth0 with any new or existing React application using the Auth0 React SDK. https://auth0.com/docs/quickstart/spa/react/01-login

alexdavis23:10:20

I don’t think you should be using reframe to implement any of that, just do it all in a function, like in the js example

alexdavis23:10:16

(defn login-button
            []
            (let [login (.-loginWithRedirect (useAuth0))]
              [:button {:on-click (fn [] login)}]))
something like that (typed on phone so might not actually work)

alexdavis23:10:53

you’re going to need to use [:f> login-button] or whatever the function component syntax is though