diff --git a/.changeset/funny-shirts-argue.md b/.changeset/funny-shirts-argue.md new file mode 100644 index 00000000..10635082 --- /dev/null +++ b/.changeset/funny-shirts-argue.md @@ -0,0 +1,5 @@ +--- +'@flatfile/react': patch +--- + +Fixes bug with re-using spaces. diff --git a/apps/react/app/re-used-space/App.tsx b/apps/react/app/re-used-space/App.tsx index 70189e57..a481ea33 100644 --- a/apps/react/app/re-used-space/App.tsx +++ b/apps/react/app/re-used-space/App.tsx @@ -93,8 +93,8 @@ const App = () => { { - const { config, children } = props + const { config, id, children } = props const { updateSpace } = useContext(FlatfileContext) const callback = useCallback(() => { - updateSpace(config) + updateSpace({ + ...(config || {}), + id, + }) }, [config, updateSpace]) useDeepCompareEffect(callback, [config])