Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds @osdk/react #1008

Merged
merged 5 commits into from
Nov 22, 2024
Merged

Adds @osdk/react #1008

merged 5 commits into from
Nov 22, 2024

Conversation

ericanderson
Copy link
Member

No description provided.

@ericanderson ericanderson force-pushed the ea.osdk-react branch 2 times, most recently from d69f844 to 481b0e3 Compare November 21, 2024 21:02
examples/example-react-sdk-2.x/src/Home.tsx Show resolved Hide resolved
function Home() {

// const client = useOsdkClient();
Copy link
Contributor

@ssanjay1 ssanjay1 Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming you left this in case people want to use it in the template, but just double checking is this intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. This lets me generate an example usage for people while still making compilable code. Ideally I could do this by detecting an object but I think thats a much bigger project and this scratches the need.

)
.replace(
// Use locally generated SDK in the monorepo
/"@osdk\/react": "[\^~].*?"/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added this right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like everything else unchanged?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, everything else is just indentation/alignment so that introducing a new one is just new lines. PS you can tell GH to ignore whitespace changes


export function useCombinedPages<T extends ObjectOrInterfaceDefinition>(
data: PageResult<Osdk.Instance<T, never, any>>[] | undefined,
): Osdk.Instance<T>[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the return type not include the property keys if they sub-selected in their fetchPage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes I think so. I also don't think I am ready to ship that function. I forget I had that in there.

@ericanderson ericanderson merged commit c8bcae6 into main Nov 22, 2024
8 checks passed
@ericanderson ericanderson deleted the ea.osdk-react branch November 22, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants