React Native: Split bf-wc-component into bf-wc-dom #3316
Labels
area-react-native
feature-request
Azure report label
p1
Painful if we don't fix, won't block releasing
Milestone
Additional context
window.open
(may be related to Embedded links in the same domain as the webchat should open in the same tab, instead of a new tab - related to #3087 #2892)Update 1 (2020-09-25)
Instead of creating a new package
bf-wc-dom
, I think we should refactor the hooks intobf-wc-core
.bf-wc-core
is cross-platformbf-wc-component
is for HTMLbf-wc-native-component
is for React Nativebf-wc
(the entrypoint) will detect/treeshake if it's from HTML or React Nativeimport 'botframework-webchat/hooks/useStyleSet'
and other treeshaking featuresTo-do
package.json/exports
(named exports) will work for exporting hooks in a treeshakable way, https://nodejs.org/api/modules.html#modules_module_exports.Update 2 (2020-09-25)
I think we should still keep
core
away from React. So I am thinking this layering:core
: internally Reduxapi
: Our API, depends oncore
import useActivities from 'botframework-webchat-api/hooks/useActivities
component
: React DOM components, depends onapi
botframework-webchat-react-component
react-native-component
: React Native components, depends onapi
bundle
: Webpack entrypoint tocomponent
andnative-component
, tree-shakable and good isolation between DOM and RNThe text was updated successfully, but these errors were encountered: