Replies: 15 comments 31 replies
-
This is exciting! I've been following for quite a while and I've seen things evolve. What a ride. As I've been part of the most recent decision, there's very little I can bring to the table in term of API design. Going through the API documentation, it strikes me how the core API is down to 8 primitives. It feels like there's so little to learn to get tremendous power. That being said, there's one little thing I'm not entirely sold but that probably because I've never had a use case for it or I just didn't know it was the solution for that use case. I'm talking about the initial value for
In any case, I can't wait for what's coming. This will be a lot of fun! |
Beta Was this translation helpful? Give feedback.
-
Based on what I've seen in the chats, seems some things are still changing. F.e. type definitions are one thing. My advice would be to wait for X amount of time without any breaking API changes (additions and fixes would be ok) before 1.0. F.e. may arbitrarily decide that you will wait 3 months without any breaking changes, and finally publish with 1.0 with the intent that 1.0 will stay around for a while. But then again, there are libs like Three.js that can break in any version release (for the better), and users have to either stay at an old version or keep up with the changelog (does a good just documenting how to migrate from version to version) . And Threejs has many users and stars despite non-semver versioning and random (documented) breaks. |
Beta Was this translation helpful? Give feedback.
-
I want to apply to join, can help translate Chinese documents and promote in China.😯 |
Beta Was this translation helpful? Give feedback.
-
I feel that having a framework like nextjs for solid is very important in its adoption. |
Beta Was this translation helpful? Give feedback.
-
I'm with Alexandre, I think this is really exciting. From my point of view, the API has really tightened-up over the last six months and stabilized for the most part - TypeScript not withstanding. If I were to consider re-evaluating anything at this point it would probably be the default behavior for signals and memos to always notify. It's really minor, but I feel that more often than not you only need to notify when something has changed, so it just becomes extra wasted work. It seems like as good a time as any to create release candidates while finishing up the initial pass on the starter kit and getting the website ready. Once those are done it should be evident if there is a need for any breaking changes. |
Beta Was this translation helpful? Give feedback.
-
I've been following the project for not so long time but noticed that there is no documentation deployed, can I help with this thing using some SSG tool, or have you already started the development of the docs website? |
Beta Was this translation helpful? Give feedback.
-
Hello, Thank you for your work on Solid.js! As a TypeScript user, here a couple of things that I find a bit annoying. I hope this is the right place to discuss them. There is no clear distinction, at use-site, whether a property access is going to be reactive or not: const Component = (props: {
foo: string
bar: string
}) =>
h('ul',
h('li', () => props.foo),
h('li', () => props.bar)
) Are const Parent = () => {
const [state, setState] = createState({ foo: 'foo' });
return h(Component, {
foo: () => state.foo,
bar: 'bar'
})
} Here, it turns out that only I believe it would be clearer if the reactiveness of the props were visible in their signature: const Component = (props: {
foo: () => string
bar: string
}) =>
h('ul',
h('li', () => props.foo()),
h('li', props.bar)
) Here it becomes clear that Relatedly, although TypeScript has a static type system, it is easy to pass the wrong props to a component. E.g., nothing prevents me from omitting the required props const Parent = () =>
h(Component, {
quux: 'quux'
}) I wish we could check that the second argument passed to |
Beta Was this translation helpful? Give feedback.
-
In my view Solid already feels stable at least for me as a pure JS user. It's not a V-DOM implementation hence the trade-off is that we need to do certain things more thoughtful (wrap state props, use components or Dynamic). Definitely we need better docs, specifically explaining the concepts and why we need to do things certain way. There are things which made me scratch my head which I'm fine with but I believe should be explained:
This confuses the transpiler: <Dynamic component={getSlot({ id: actionResults.getUiStateLive.openedMenu })}/> but this works: <Show when={actionResults.getUiStateLive.openedMenu === 'projectExplorer'}>
<Dynamic component={getSlot({ id: 'projectExplorer' })}/>
</Show>
<Show when={actionResults.getUiStateLive.openedMenu === 'componentList'}>
<Dynamic component={getSlot({ id: 'componentList' })}/>
</Show>
<Show when={actionResults.getUiStateLive.openedMenu === 'settings'}>
<Dynamic component={getSlot({ id: 'settings' })}/>
</Show>
That's it from what I had on top of my head. I really appreciate the simple API and the flow control components. I would also explain the difference in thinking when using V-DOM vs Solid. E.g. with Solid, a component is called just once which is awesome but you can't just drop I'd be happy to help in forming the docs and covering the edge cases I've encountered so far. |
Beta Was this translation helpful? Give feedback.
-
Glad to help with more about Chinese introducing, using for shadow dom app, style solution, etc as we are working with solid widely in these areas and very happy about this project. One discussion here: as our projects are more of shadow dom apps embedded in other main apps, so no global effect is very import ant. We would like to disable event delegation for our app, but currently we have to update both compile options and runtime options, which is not convenient. could this be collected into one place? related issue |
Beta Was this translation helpful? Give feedback.
-
Had a few really good suggestions from the Discord.
|
Beta Was this translation helpful? Give feedback.
-
API idea: as we already created a context object by |
Beta Was this translation helpful? Give feedback.
-
Small DX feedback: typing Also, when doing so, the import ends ups being the following:
Whereas I would rather have:
Suggestion: reexport
I realise |
Beta Was this translation helpful? Give feedback.
-
Another small DX feedback: One thing I like with JSX-first libraries, as opposed to templates-first libraries, is that one file can host many components. When came the time to use const LazyComponent = lazy(async () => ({ default: (await import('./my-component')).NonDefaultComponent) })); To make this a bit easier, I defined the following wrapper: import { Component, lazy as defaultLazy } from "solid-js";
export function lazy<T extends Component<any>>(
fn: () => Promise<{
default: T;
}>
): T & {
preload: () => Promise<T>;
};
export function lazy<
M extends { [key: string]: Component<any> },
K extends keyof M
>(
fn: () => Promise<M>,
key: K
): M[K] & {
preload: () => Promise<M[K]>;
};
export function lazy<M extends object, T extends Component<any>>(
fn: () => Promise<M>,
accessor: (module: M) => T
): T & {
preload: () => Promise<T>;
};
export function lazy(
fn: () => Promise<any>,
accessor?: (module: any) => any
): Component & {
preload: () => Promise<Component>;
} {
if (typeof accessor === "undefined") {
return defaultLazy(fn);
}
if (typeof accessor === "string") {
return defaultLazy(async () => {
return { default: (await fn())[accessor] };
});
}
return defaultLazy(async () => {
return { default: accessor(await fn()) };
});
} It can be used this way: const LazyComponent = lazy(() => import('./my-component'), "NonDefaultComponent"); Or this way: const LazyComponent = lazy(() => import('./my-component'), (module) => module.NonDefaultComponent); It typechecks and autocompletes nicely. It is also compatible with the current definition of Would you be keen on exposing a similar API? |
Beta Was this translation helpful? Give feedback.
-
Ok I have one last change I want to get in for 1.0. It is syntax but it will affect most projects. I wish to rename I believe this accomplishes the following:
Interested in any thoughts. Anything I might be missing. |
Beta Was this translation helpful? Give feedback.
-
By pure chance, I just saw that 1.0 has been tagged a moment ago 😱 🎉 Congrats to 1.0! Great to see that milestone reached, and thanks for all the hard work! |
Beta Was this translation helpful? Give feedback.
-
As you know I've been gearing up for a 1.0 release. I feel like I've addressed most of the major topics at this point and I just want make sure there aren't any things that you all feel need addressing. Once I flip modes I will be working more on documentation and the website and will halt most Solid development outside of starter stuff and bug fixes for the next couple months.
I feel I'm mostly ready to lock that down, so I'm looking for suggestions or feedback. Any APIs that are awkward or have weird naming now is the time. I'm pretty happy where things are about stuff like
createState
andcreateComputed
still give me pause. The waysetState
merges objects might not be intuitive. I am not comitting to changing things as I'm reasonably happy where things are but I definitely appreciate any honest feedback to see how I can approach categorizing and if any of these things are vital enough and breaking to make the 1.0 release.So please respond to this thread with anything that comes to mind to this nature. I will be putting together RC release for next week if nothing major comes up. I appreciate your time and consideration.
Some other matters of related business:
Growing the Team
We also are looking at growing the team of core maintainers for Solid. Feel free to reach out to me if you are interested in helping out. While the core library can be daunting at times there is still plenty of tertiary stuff to do around integrations and the website and help with bug reproductions etc... Especially as the library gains some more steam after 1.0 release. I suggest getting involved in our Discord as a start if you haven't already. I already see community leadership forming there and will be looking to formalize that a bit more in coming months.
Moving to GIthub Org
We are planning to move off my personal github to an org. Unfortunately just about every variant of Solid/SolidJS is taken. So I've registered
solidui
. Maybe not the best thing but the best I could find. If there is no good reason not to make the move we will be doing so over the next little while.UPDATE: We got solidjs as the github org!
Beta Was this translation helpful? Give feedback.
All reactions