Mathieu
Mathieu
Explore posts from servers
SSolidJS
Created by Mathieu on 11/8/2023 in #support
Use of `<Outlet />` vs `props.children` leads to duplicated code?
@andi this is super cool, thank you!!
3 replies
SSolidJS
Created by Mathieu on 11/5/2023 in #support
Clicking browser's Back button from external site doesn't render the right state
Okay can't believe this actually worked:
function handleGoogleButtonClick() {
const handlePageShow = (event: any) => {
if (event.persisted) {
window.location.reload();
}
};
window.addEventListener('pageshow', handlePageShow);
onCleanup(() => {
window.removeEventListener('pageshow', handlePageShow);
});

document.location.assign(import.meta.env.VITE_GOOGLE_OAUTH_URL);
}
function handleGoogleButtonClick() {
const handlePageShow = (event: any) => {
if (event.persisted) {
window.location.reload();
}
};
window.addEventListener('pageshow', handlePageShow);
onCleanup(() => {
window.removeEventListener('pageshow', handlePageShow);
});

document.location.assign(import.meta.env.VITE_GOOGLE_OAUTH_URL);
}
2 replies
CDCloudflare Developers
Created by Mathieu on 11/3/2023 in #general-help
[Pages] Running script requires package
Looks like I jsut had to add npm install copyfiles -g && I couldnt imagine this was allowed to do hehe
2 replies
SSolidJS
Created by Mathieu on 10/19/2023 in #support
Can I avoid the getter while keeping the reactivity?
Thank you!!
4 replies
SSolidJS
Created by Mathieu on 10/19/2023 in #support
Can I avoid the getter while keeping the reactivity?
Oh man 😂
4 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
ah cause again, the getter got ran, ahmmm
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
@Tito btw why when I log console.dir(props.selectedOption) I cant see any getter or anything special, looks like a plain object literal
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
I didn't do any kind of wrapping here
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
(btw this becomes unrelated to the original question about mergePops and thank you so much both<3)
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
if I add a createEffect in the children, and I change selectedEntityId from the parent, the createEffect will run, because the props (selectedOption) is reactive
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
@Tito there is reactivity because of selectedEntityId signal. I could make a dervied signal and pass it but that would be the same
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
but how when that reactive variable changes from a value to undefined, that code that does the fallback is ran again? So the mergeProps is not only ran once on mount, this code is ran subsequently somehow
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
I thought it would fallback only one time. but we can see that there is reactivity, and it's like a reactive fallback, where whenever the option is undefined, it will fall back (i.e. it's not ran only once, but it's reactive)
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
so merging also adds a behaviour, so the "api" kinda changes. this is what I noted that it makes code less intuitive as I have to know, was this merged or not
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
no I typed this before seeing Tito reply
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
@Tito thank you, that is the accessor () => ({ ... }) solution of @mdynnl ?
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
@mdynnl when you say eagerly, I think you mean accessing early before something happens. What is it in this case?
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
it's not intuitive I think
34 replies
SSolidJS
Created by Mathieu on 10/16/2023 in #support
Issue with reactivity when using mergeProps
@mdynnl if static, why did the effect ran twice in Select? You may see the 2 logs in the Select, logging the value of props.selectedOption output the same value. Why did the effect ran the second time if the value didn't change?
34 replies