How to use the __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED function from react

Find comprehensive JavaScript react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED code examples handpicked from public code repositorys.

14
15
16
17
18
19
20
21
22
23

var _assign = require('object-assign');
var React = require('react');
var ReactDOM = require('react-dom');

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
fork icon21
star icon25
watch icon2

+ 11 other calls in file

237
238
239
240
241
242
243
244
245
246
247
248
249


var Pending = 0;
var Resolved = 1;
var Rejected = 2;


var ReactCurrentDispatcher = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;


function readContext(Context, observedBits) {
  var dispatcher = ReactCurrentDispatcher.current;
  if (dispatcher === null) {
fork icon0
star icon0
watch icon1

37
38
39
40
41
42
43
44
45
  return {type: 'span', children: [], prop, hidden: false};
}

function readContext(Context, observedBits) {
  const dispatcher =
    React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
      .ReactCurrentDispatcher.current;
  return dispatcher.readContext(Context, observedBits);
}
fork icon0
star icon0
watch icon0