Skip to content

Upgrading react winjs to a new version of WinJS

AmazingJaze edited this page Oct 5, 2015 · 6 revisions
  1. Run winjs-control-apis on the latest winjs.d.ts file. This will generate data about the WinJS control API surface that react-winjs can consume.
  2. Replace the definition of RawControlApis with the output from the tool.
  3. View the diff of your changes to react-winjs.js.

Changed Controls

Note any controls that were added or removed from RawControlApis. These controls should be added or removed from ControlApis near the bottom of the file as appropriate.

Changed Properties

Each property in RawControlApis is automatically mapped to a PropHandler which describes how each react-winjs component's prop gets converted to the WinJS control's property. Most get mapped to PropHandlers.property. Those that begin with on are assumed to be events and get mapped to PropHandlers.event.

Note any properties that were added, removed, or edited in RawControlApis in the diff. If the PropHandler it'll be assigned by default based on the description above isn't appropriate or if you'd like to add an additional prop to the react-winjs component to make usage from React more convenient, you'll need to specify an appropriate PropHandler in ControlApis near the bottom of the file. Review the built-in list of PropHandlers to see if there's one you can use.

  1. package.json. Update the version number of WinJS in peerDependencies in the package.json file.

  2. README.md. Update all references to the WinJS version in README.md.

  3. examples.

  • Update each example to use the latest version of WinJS.
  • Update each example based on API changes that occurred in WinJS.
  • Add examples to the showcase example based on new APIs in WinJS.
  1. Update the Documentation

As a reference, here's the commit which updated react-winjs to WinJS 4.4: 0cd339

Clone this wiki locally