-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export renderers for renderhtml #32
Export renderers for renderhtml #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ziet er prima uit. Ik zou 't nog wel willen zien werken in https://github.com/observation/obsidentify/pull/912, dus als je deze PR in die change kan verwerken, zal ik weer kijken.
imgRenderer, | ||
olRenderer, | ||
ulRenderer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waarom is opnieuw exporteren op een andere plek nodig? Kun je in de app niet
import RenderHtmlWrapper, { imgRenderer, olRenderer, ulRenderer } from '@observation.org/react-native-components'
doen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dan krijg ik: "Module '"@observation.org/react-native-components"' has no exported member 'imgRenderer'." Bij alle renderers waaraan ik export
heb toegeveoegd, toen ik ze daarna toevoegde aan de index kreeg ik de melding niet meer, of los ik dat op een andere manier op?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ja, je hebt gelijk. Deze import werkt vermoedelijk wel:
import RenderHtml, { imgRenderer, olRenderer, ulRenderer } from '@observation.org/react-native-components/src/components/RenderHtmlWrapper'
Nadeel is dat we de interne structuur van de component-library gebruiken (src/components
). In de huidige setup exporteren we alle componenten als named exports vanaf de root. We verliezen de namespaces die we eerst wel hadden. Alle exports komen in 1 lange lijst van named exports terecht. Wellicht is er een betere oplossing mogelijk. Maar dat doen we niet in deze PR, dus voor nu is het toevoegen van exports in de root van de library wel goed.
Ja goeie, heb het toegevoegd! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
5f652b7
to
4e10897
Compare
Needed for: https://github.com/observation/obsidentify/pull/912