Amir Hossein Hashemi
Explore posts from serversUnderstanding `createRoot`
Another question: the docs says that
createRoot
frees memory and computations. Memory is understandable, but what creates computation and what it means to free a computation? Is it related to the createComputed
primitive?19 replies
Understanding `createRoot`
Thank you, Ryan, for your response.
It seems that the owner of the reactive scope—whatever it’s called—is responsible for managing the reactive scope and remains active. This means it doesn't get untracked or removed, as there would be no one to manage the reactive scope without it.
Is the main difference between an owned and an unowned reactive scope that the unowned reactive context, created by, for example,
createEffect
, can be removed?19 replies
Why submission result doesn't update?
This way [I think] we lose progressive enhancement and it's a lot of code compared to using
action
. Maybe a better approach would be to always return something from the action if the result is used:
8 replies
Why submission result doesn't update?
Thank you @peerreynders for your informative response.
So you should get into the habit on clearing submissions that carry data (error or result) once you've retained the necessary information in order to not be confused by stale entries later on.Can you please explain how this should be done in my example code? I'm aware of the
clear
method, but I don't know the best practice on where to call it.8 replies
RRefine
•Created by adverse-sapphire on 11/8/2023 in #ask-any-question
How to disable authentication in a page?
@kapa.ai The
window
object is not available in the server. Considering I'm using SSR this might be a problem12 replies
RRefine
•Created by flat-fuchsia on 11/8/2023 in #ask-any-question
How to disable authentication in a page?
@kapa.ai I want to completely disable authentication for a specific page. What should I do?
12 replies
RRefine
•Created by quickest-silver on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
Hey @Omer . Thank you for the help. I was going to open an Issue but I saw a commit that addresses it. Looking forward for it being shipped in the next release.
26 replies
RRefine
•Created by ambitious-aqua on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai No I don't call any auth-provider's method in my data-provider. I have an access-control-provider too but it also doesn't use auth-provider's methods
26 replies
RRefine
•Created by rising-crimson on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai What do you mean by "specific behavior of your data provider or auth provider." This is my auth-provider:
26 replies
RRefine
•Created by variable-lime on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai I've narrowed down the issue to the
useDelete
hook. I don't render anything else in the screen but still the ["getUserIdentity"]
query is being called for each button.26 replies
RRefine
•Created by probable-pink on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai But I'm not using
<Edit>
and any component from the component libraries that refine supports. Anywhere else uses meta.canDelete
?26 replies
RRefine
•Created by flat-fuchsia on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai I'm not using the
<DeleteButton>
component and I'm not using useCan
or useIdentity
in a relevant component. But in the docs you pass a meta.canDelete
property to resources
prop in the <Refine>
component. I've removed it. Could it be the cause of the problem?26 replies