You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given we want to be able to provide better integration with existing JS frameworks to provide guided stories, the following blockers for NextJS should be (re-)assessed:
Exotic filenames: Right now, NextJS heavily relies on exotic filenames / duplicated filenames, which requires ReScript users to re-export ReScript components in shim JS files in the pages and app directoy
Shared props for getStaticProps / default export: Previously, one had to fall back to let default = (props) => {} just to be able to share the props between the consuming component and getServerProps etc. ... I think this should be solved with @mununki's new JSX 4, which should be able to provide a custom prop type to a @react.component decorator
Props serialization with undefined props: Previously, serializing props from getServerProps etc. will cause the frontend to break, because foo: undefined is not valid JSON (it gets passed as a string and then JSON.parsed). This should be fixed with optional attributes (e.g. {foo ?: string})
Function level directives ("use server";): As for right now, it is only possible to provide those directives on the module level. We'd need a way to maintain directives on a JS function level
(Please note: The provided list is kept short, details should be refined in linked issues if there's any need to solve a problem)
The text was updated successfully, but these errors were encountered:
Not sure if I should make a new issue for this, but since I saw this one I thought it could be a good option for a place. I noticed some weird issues with the Js.Promise2 module. It was causing the app to bomb with a very vague error. The error when logged looks something like this: [Function (anonymous)] as you can see not very descriptive. So I'm not sure what the issue is. I switched to Js.Promise for now but this uses pipe-last of course so it would be nice if we could use Promise2.
Not sure if I should make a new issue for this, but since I saw this one I thought it could be a good option for a place. I noticed some weird issues with the Js.Promise2 module. It was causing the app to bomb with a very vague error. The error when logged looks something like this: [Function (anonymous)] as you can see not very descriptive. So I'm not sure what the issue is. I switched to Js.Promise for now but this uses pipe-last of course so it would be nice if we could use Promise2.
The next version(v19, already in use) of React treats promises as first-class type (can be used as child element!) So now having your own runtime representation for promises can be problematic.
Note: it is available regardless of using RSC or not, see an example
Given we want to be able to provide better integration with existing JS frameworks to provide guided stories, the following blockers for NextJS should be (re-)assessed:
pages
andapp
directoylet default = (props) => {}
just to be able to share theprops
between the consuming component andgetServerProps
etc. ... I think this should be solved with @mununki's new JSX 4, which should be able to provide a custom prop type to a@react.component
decoratorgetServerProps
etc. will cause the frontend to break, becausefoo: undefined
is not valid JSON (it gets passed as a string and thenJSON.parse
d). This should be fixed with optional attributes (e.g.{foo ?: string}
)"use server";
): As for right now, it is only possible to provide those directives on the module level. We'd need a way to maintain directives on a JS function level(Please note: The provided list is kept short, details should be refined in linked issues if there's any need to solve a problem)
The text was updated successfully, but these errors were encountered: