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

feat: replace `react-dom-core` with `react-property` #117

Merged
merged 7 commits into from Jul 9, 2019

Conversation

Projects
None yet
2 participants
@remarkablemark
Copy link
Owner

commented Jul 8, 2019

Resolves #107

remarkablemark added some commits Jul 7, 2019

feat(attributes-to-props): replace `react-dom` with `react-property`
Save `react-property@0.1.0` to package.json dependencies and remove
`react-dom-core`.

Delete `lib/property-config.js` given that the mapping is already
created in `react-property`.

Fix incorrect test since both `ychannelselector` and
`yChannelSelector` are applicable SVG attribute names.

Resolves #107
feat(attributes-to-props): check for overloaded boolean values
For HTML DOM attributes that can be either boolean or string,
make sure to convert the value correctly for React.

Add test to confirm `download` attribute is properly converted.
fix(attributes-to-props): handle attr named after Object properties
Since the property config is a POJO (Plain Old JavaScript Object),
this means the Object properties/methods are accessible.

Thus, use `hasOwnProperty` to check if the attribute name is on the
config map rather than on the Object prototype chain.

Handle attributes that share the same name as custom attributes.
@coveralls

This comment has been minimized.

Copy link

commented Jul 8, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 26ebef9 on feat/react-property into c963bc0 on master.

@remarkablemark

This comment has been minimized.

Copy link
Owner Author

commented Jul 8, 2019

File react-dom-core react-property
html-react-parser.js 66K 69K
html-react-parser.min.js 19K 25K
@remarkablemark

This comment has been minimized.

Copy link
Owner Author

commented Jul 9, 2019

File react-dom-core react-property@0.1.0 react-property@1.0.0
html-react-parser.js 66K 69K 54K
html-react-parser.min.js 19K 25K 18K
build(package): update `react-property` to 1.0.1
There are optimizations that help decrease the final bundle size.
@remarkablemark

This comment has been minimized.

Copy link
Owner Author

commented Jul 9, 2019

File react-dom-core react-property@0.1.0 react-property@1.0.0 react-property@1.0.1
html-react-parser.js 66K 69K 54K 53K
html-react-parser.min.js 19K 25K 18K 17K

@remarkablemark remarkablemark merged commit 6278ec1 into master Jul 9, 2019

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 100.0%
Details

@remarkablemark remarkablemark deleted the feat/react-property branch Jul 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.