Closed vaneenige closed 1 year ago
Hi @vaneenige, sorry for the late reply.
I just ran your reproduction and did not get a React error. The component works as it does in, for example, Next.js.
To clarify how I tested this, I followed these steps:
npx create-remix@latest
.@prismicio/react
.<SliceZone>
with mock data.npm run dev
and test the page (tests for development bugs).npm run build && npm run start
and test the page (tests for production bugs).I'm going to close this for now, but please let me know this is an issue you're still experiencing and I will re-open it.
Thanks!
Versions
Steps to reproduce
@prismicio/react
import { SliceZone } from '@prismicio/react';
What is expected?
As Remix is also based on React I expected this to work. We used
prismic-reactjs
before with Remix without issues.What is actually happening?
An
Identifier 'React' has already been declared
error is thrown.Could-be fix
To try and "fix" the problem I looked in
@prismicio/react/dist/index.js
and I replaced:import * as React from 'react';
withimport React from 'react';
And yes, now everything works as expected, the helpers and slicezone!Is there a specific reason it should be with the
*
? Otherwise changing this would be great!