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

Prebuilt versions in /dist are broken #209

Closed
joepvl opened this issue Sep 28, 2017 · 4 comments · Fixed by #212
Closed

Prebuilt versions in /dist are broken #209

joepvl opened this issue Sep 28, 2017 · 4 comments · Fixed by #212

Comments

@joepvl
Copy link
Collaborator

joepvl commented Sep 28, 2017

See title. I might be missing someting but it seems those dist files should all Just Work™, the only requirement being that React and ReactDOM are included on the page. The minified version does load, but it gives a cryptic error in the console when rendering any of the components. The unminified version throws an error when merely using a component. You can find an example here: https://codepen.io/joep/pen/oGWxJm. You'll have to open your browser console to see the errors, as Codepen's built in one doesn't show them.

I guess priority on this issue shouldn't be super high, as it seems this has been broken for a while (since 1.0.0, actually) and no one seems to have complained since. ;)


P.S. If you've come here in search of a way to test react-tabs directly in your browser, try a tool like codesandbox.io or webpackbin.com.
Here's a CodeSandbox example: https://codesandbox.io/s/3x010xpw8m.

@danez danez mentioned this issue Oct 5, 2017
@danez danez closed this as completed in #212 Oct 5, 2017
@danez
Copy link
Collaborator

danez commented Oct 10, 2017

This is fixed in the latest version see https://github.com/reactjs/react-tabs#installing

@joepvl
Copy link
Collaborator Author

joepvl commented Oct 11, 2017

I noticed, awesome! Although it seems only the production version is working at the moment, the development version will throw with react-tabs.development.js:689 Uncaught TypeError: Cannot read property 'oneOfType' of undefined because PropTypes is not included in the build. 😅

So I guess we should either tell people to include

<script src="https://unpkg.com/prop-types/prop-types.js"></script>

in their code before the react-tabs <script> tag, or include it in the development build somehow.
BTW I think we went over this or a similar issue at some point, probably when moving the rest of the code over to using prop-types.

@danez
Copy link
Collaborator

danez commented Oct 12, 2017

It is mentioned in the Readme and in the examples

@joepvl
Copy link
Collaborator Author

joepvl commented Oct 12, 2017

Aww yeah, missed that! Apologies. And thanks again for all the work you put in. 👍

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants