New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reason-react

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reason-react - npm Package Versions

1235

0.3.0

Diff
chenglou
published 0.3.0 •

Changelog

Source

0.3.0

Technically a breaking change, but just because of the removal of a few deprecated things. No migration script this time; since the few breaking changes you encounter (if any) should have be spotted by the type system and fixed in a few secs anyway.

Improvements:

  • Loosen children's restriction. This unlocks huge potentials. See the blog post!
  • Fix a bug where side effects inside side effects were skipped (#98).
  • React 16 support.
  • All files upper-cased. This follows the new community idiom. Technically an internal change; doesn't affect your usage of ReasonReact.
  • More DOM props. There are like, more DOM props added per year than the number of releases we have. What a funny time to be alive.

Breaking Changes:

  • ref is now typed as Js.nullable(Dom.element), not Js.null(Dom.element). Js.nullable is the new community idiom from BuckleScript. Go through your codebase and change your state.myRef := Js.Null.to_opt(theRef) into state.myRef := Js.Nullable.to_opt(theRef). We suggest you to also remove all mentions of Js.null, Js.undefined, Js.Null and Js.Undefined. Js.Nullable checks for both JavaScript null and undefined, thus making the JS interop more robust. In the past, people type certain values (especially js objects fields) as e.g. null and forget they can be undefined.
  • DOM components (ReactDOMRe)'s open, end and in attributes are now changed to _open, _end and _in to avoid using reserved keywords. This is only breaking if you're using these attributes and are on the old syntax.
  • Remove old stuff: enqueue, statefulComponent and self.update. These have long been deprecated.
chenglou
published 0.2.4 •

Changelog

Source

0.2.4

Major update, but again with no breaking changes, and again with a convenience migration script! =)

The big change in this release is the deprecation of statefulComponent and statefulComponentWithRetainedProps. statelessComponent stays the same.

chenglou
published 0.2.3 •
chenglou
published 0.2.2 •
chenglou
published 0.2.1 •

Changelog

Source

0.2.1

Breaking update (sorry!)

We've finally removed ReactRe. It's been deprecated since 0.1.4. And we've offered a comprehensive migration in the 0.1.4 section below.

We've given folks a bit of breathing room in terms of breaking changes; now we're shipping another one, this time with a small migration script. After installing reason-react, use node node_modules/reason-react/oldScriptCarefulMigrateFrom015To020.js myReasonFile.re

  • Instead of fun state self => ..., we've now rolled state into self, and now, you have fun {state, handle} => .... The whole record is self. Feel free to destructure and get whatever you need!
  • self now contains a new prop, retainedProps. This is a new (non-breaking) feature that solves the previous slightly inconvenient way of forwarding props to state, as described in the old API's lifecycle methods. Now there's a dedicated API for it! The docs describes this in detail.
chenglou
published 0.2.0 •
chenglou
published 0.1.5 •

Changelog

Source

0.1.5

Non-breaking update. Works better with bs-platform >=1.8.0, which comes with the following ReasonReact JSX fixes:

  • JSX ppx now recursively transforms component's props.
  • JSX ppx now reports the correct location for some errors.
  • JSX ppx now correctly transforms some corner case with ref and key (ref=?foo).

Our own release contains the following improvements:

  • Adjust ReactDOMRe's props and style to include more accurate DOM and style attributes and styles (#9, #15, #17).
  • Add ReactDOMRe.Style.unsafeAddProp to unsafely add a prop to an existing style. Make sure you know what you're doing!
  • Fix reactRef's type in various locations. A React ref is actually always nullable; we've previously only acknowledged it for DOM ref, now we do for custom (composite) components ref too. A more detailed explanation is here. This is documented in our docs in the ref section as well.
  • Add cloneElement (solves adding otherwise invalid keys like aria-label and data-foo).
  • Add shouldUpdate.
chenglou
published 0.1.4 •

Changelog

Source

0.1.4

Major update! Though this is 100% backward compatible, so no major version bump. We've revamped the whole API based on all you awesome folks' feedback, and we've provided a gradual migration path.

chenglou
published 0.1.3 •

Changelog

Source

0.1.3

DOM ref is now typed as Js.null Dom.element, instead of just Dom.element (https://github.com/reasonml/reason-react/commit/6f2a75b). Trivial migration: https://github.com/reasonml-community/reason-react-example/commit/b44587a

chenglou
published 0.1.2 •

Changelog

Source

0.1.2

Add defaultValue prop for input DOM component (https://github.com/reasonml/reason-react/commit/c293c6e)