Comments (14)
I just need to update the PR with the last change in the upstream and we could merge it ;)
from react-element-to-jsx-string.
For now we do not officially target the browser.
We are open to find a solution for the stringify-object
browser incompatibility. It could also be a replacement of this lib. Feel free to help if you have idea! 😃
from react-element-to-jsx-string.
I tried to experiment with replacing stringify-object
and instead use Object.keys
but I realized that it's a bit more complicated since stringify-object
is recursive.
It would be helpful if you could tell me what's the expected result needed here.
I'll try my best matching it :)
from react-element-to-jsx-string.
We had the same problem. I think the better solution is to ship react-element-to-jsx-string
as a single file library together with current set of modules. That's will be useful to use in browsers.
I'm working on it right now in my fork. I can PR a solution when done if your interesting to merge it.
from react-element-to-jsx-string.
I'm not sure we should rewrite stringify-object
. Lots of work for a complex problem.
I think @lahmatiy have a point, the solution could be at build time. I will give a try to https://github.com/SamVerschueren/babel-engine-plugin It could allow us to compile stringify-object
to target the browser
from react-element-to-jsx-string.
it would work if react-element-to-jsx-string
would ship with all of its dependencies already compiled but that would mean a possible duplication of dependencies in the consuming packages.
I tried using https://github.com/SamVerschueren/babel-engine-plugin in my app but that didn't work for me 😞
from react-element-to-jsx-string.
After thinking to this, I guess the only real solution is to introduce a bundler (webpack? rollup.js?) to build a dedicated version of the library for the web.
This bundled version will became the default one exposed in the main
package field.
We will continue to produce the same bundle for node and expose it in the module
package field (or whatever it is nowadays).
This will a lots of build/maintenance overlay in our side but I think this could worth it 👍
from react-element-to-jsx-string.
@Spy-Seth It's worth keeping in mind to try and make the dist as small as possible (to prevent package duplication)
I definitely think this would be worth it! this could be made simple with an npm script and hooking into prepublish
to do just that 👍
from react-element-to-jsx-string.
Here it is: #242
from react-element-to-jsx-string.
Is the browser PR OK to merge/release?
from react-element-to-jsx-string.
Is there any update on this?
from react-element-to-jsx-string.
Any update?
from react-element-to-jsx-string.
Hi! 👋 I think this may not have been fixed in 14.0.0
.
https://unpkg.com/[email protected]/dist/cjs/index.js
stringifyObject
contains a number of arrow functions in the dist
. Happy to submit a PR to make babel process it:
https://github.com/algolia/react-element-to-jsx-string/blob/master/rollup.config.js#L28
from react-element-to-jsx-string.
@danoc If you have a way to solve this in a nice way then yes submit it, up for it!
from react-element-to-jsx-string.
Related Issues (20)
- Convert this package to typescript HOT 3
- Dependency Dashboard
- Release new version HOT 5
- Move this repository to a new home HOT 2
- The requested module 'react-is/index.js' does not provide an export named 'ForwardRef' HOT 10
- Crash with v14.3.3 and newer with Gatsby
- production jsx string not correct HOT 5
- 14.3.3 causes crashes in Storybook HOT 4
- Error isPlainObject is not a function HOT 3
- Update react peerDependencies for React 18 HOT 5
- `useBooleanShorthandSyntax` strip false values HOT 3
- Convert jsx-string back to react-element HOT 1
- Release new version with bumped dependencies
- 15.0.0 changes
- Vulnerability in json dependency
- rm'd
- No handling for Symbol-named JSX tags like React.StrictMode
- Add a tag for new version 15.0.1
- className not working?
- <Form.Item> in antd is converted incorrectly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-element-to-jsx-string.