icestark icon indicating copy to clipboard operation
icestark copied to clipboard

How to use injection props

Open maoxiaoke opened this issue 3 years ago • 0 comments

Background

There is no other way to pass the injection argument to a sandbox. It may go like this:

new Sandbox({
  injection: {
    a: 'a'
  },
  // other arguments
})

As a result, one can pass injection like:

<AppRoute
  sandbox={{ injection }}
  >
</AppRoute>

maoxiaoke avatar Apr 20 '22 10:04 maoxiaoke