mrVinicius
mrVinicius
Explore posts from servers
SSolidJS
Created by mrVinicius on 6/22/2024 in #support
solidjs pnpm workspace
I'm trying to set up a pnpm workspace to share a library within my main app, but I can't get it to work. I tried to follow a few repository examples, but I have no idea why it's not working. I made an exact copy of my architecture and the problem im facing: https://github.com/mrVin99/solid-workspace/tree/main
@parcel/core: Failed to resolve 'solid-js/jsx-dev-runtime' from './src/layout.tsx'

/home/mrvin/newfolder/web/solid-workspace/src/layout.tsx:1:1
> 1 | import {Button} from "visuals/src";
> | ^
2 |
3 | export default (props: any) => {

@parcel/resolver-default: Cannot load file './jsx-dev-runtime' from module 'solid-js'
@parcel/core: Failed to resolve 'solid-js/jsx-dev-runtime' from './src/layout.tsx'

/home/mrvin/newfolder/web/solid-workspace/src/layout.tsx:1:1
> 1 | import {Button} from "visuals/src";
> | ^
2 |
3 | export default (props: any) => {

@parcel/resolver-default: Cannot load file './jsx-dev-runtime' from module 'solid-js'
3 replies
SSolidJS
Created by mrVinicius on 6/12/2024 in #support
VsCode: Cannot find name react
No description
7 replies
SSolidJS
Created by mrVinicius on 5/18/2024 in #support
Insights on my component library
Hello, i'm building my own component library to fit my project needs. I'm having a bit of a problem with state management Do anyone have a better way to work with state other than using Provider? On this particular component im using a signal state to know if its open or not. And i must wrap it into a provider or else when i have two or more dropdown they share state, but passing a provider makes the overall api feels clunky. Any improvements suggestions?
8 replies
SSolidJS
Created by mrVinicius on 4/20/2024 in #support
library template
Is there a template which i can use to create my own libraries?
4 replies
SSolidJS
Created by mrVinicius on 4/1/2024 in #support
Router isn't working.
Why routing is not working when i'm following exactly what doc says. Doc: https://docs.solidjs.com/solid-router/getting-started/defining-routes
Home.tsx:
export default () => {
return (
<h1>Hello World</h1>
)
}

index.tsx:
import {render} from "solid-js/web";
import {Route, Router} from "@solidjs/router";
import Home from "./HelloWorld";

render(() => (
<Router>
<Route path="/home" component={Home}/>
</Router>
), document.getElementById("app")
);
Home.tsx:
export default () => {
return (
<h1>Hello World</h1>
)
}

index.tsx:
import {render} from "solid-js/web";
import {Route, Router} from "@solidjs/router";
import Home from "./HelloWorld";

render(() => (
<Router>
<Route path="/home" component={Home}/>
</Router>
), document.getElementById("app")
);
I'm getting the following error: 'index.tsx:5 Unrecognized value. Skipped inserting'
30 replies
SSolidJS
Created by mrVinicius on 3/28/2024 in #support
Restricte route by user role, possibly a middleware?
Hello, I would appreciate some assistance from more experienced web developers, if possible. My issue revolves around user roles and restricting access to certain routes based on those roles. While I've successfully hidden the navigation buttons, there remains an issue: if a user types a restricted route directly into the URL, they can still access the associated component, which is something I want to prevent. Currently, I've implemented a solution where if a user attempts to access a restricted route, they are redirected back to their previous route in history. However, this solution isn't optimal as it causes a momentary loading of the component before the redirection occurs. - Im using SolidJS SPA + Go server, not SolidStart. Any insights would be greatly appreciated.
14 replies
CC#
Created by mrVinicius on 6/24/2023 in #help
❔ event handler not being triggered
18 replies