Skip to content

Commit

Permalink
let's just don't use JSX for now - another bun bug
Browse files Browse the repository at this point in the history
  • Loading branch information
harrel56 committed Apr 12, 2024
1 parent 24ef943 commit eac4b4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.js → build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ await Bun.build({
sourcemap: 'external',
plugins: [
dts()
],
]
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"directory": "main"
},
"scripts": {
"build": "bun run build.js --bun"
"build": "bun run build.ts --bun"
},
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
Expand Down
10 changes: 5 additions & 5 deletions src/SortableProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Context, createContext, PropsWithChildren, useRef} from 'react';
import {jsx} from "react/jsx-runtime";
import {BiDiMap} from './utils';

interface ContextContent {
Expand All @@ -25,9 +26,8 @@ export const SortableProvider = (({children}: PropsWithChildren) => {
return sortables.current.get(sortable)!.getValue(item) as T
}

return (
<SortableContext.Provider value={{registerSortable, unregisterSortable, findItem}}>
{children}
</SortableContext.Provider>
)
return jsx(SortableContext.Provider, {
value: { registerSortable, unregisterSortable, findItem },
children
})
})

0 comments on commit eac4b4a

Please sign in to comment.