These are chat archives for canjs/canjs

21st
Dec 2018
Justin Meyer
@justinbmeyer
Dec 21 2018 02:25
@the-learning-man if you are using steal, you can simply import stache files
however, if you aren't using steal, you can use can.ajax to load the file and pass it to stache()
Ivo Pinheiro
@ivospinheiro
Dec 21 2018 19:04
Hi guys!
As recommended by @phillipskevin I've added <html data-can-automount="false"> to my application in order to run fine on FF44.
But it has a side-effect, it will break can-react-component because if I'm not wrong the current implementation is expecting that custom elements are supported by the browser, am I right?
Frank Lemanschik
@frank-dspeed
Dec 21 2018 22:43
@ivospinheiro you need to use something diffrent
can-react-component is maybe deprecated kevin will call it probally none deprecated
but in my lang it is :)
is what your searching for
it is using canjs observables with react
Ivo Pinheiro
@ivospinheiro
Dec 21 2018 23:09
I'm using can-react-component to wrap can components as react components
@frank-dspeed If I'm not wrong ylem is used as a State Managment for react
Frank Lemanschik
@frank-dspeed
Dec 21 2018 23:11
yes but that is not documented on current canjs
and don't got updated longer
but to answer your question!
your right without custom Componnts elements api in your browser
nothing will render without can-automount
Ivo Pinheiro
@ivospinheiro
Dec 21 2018 23:13
It has been updated recently I`ve had also contributed to fix a bug
Frank Lemanschik
@frank-dspeed
Dec 21 2018 23:13
you need to mount manual
Ivo Pinheiro
@ivospinheiro
Dec 21 2018 23:13
Probably we have to render component using stache I guess
Frank Lemanschik
@frank-dspeed
Dec 21 2018 23:13
there are many ways
hard to say whats the right for your project
one way is to let stache render the component tag
thats right
but i would simply polyfill custom elements
so you don't need to change much
Ivo Pinheiro
@ivospinheiro
Dec 21 2018 23:21
Could you point me out some info about polyfill custom elements?
That's new for me
Frank Lemanschik
@frank-dspeed
Dec 21 2018 23:24
you can add this
<script src="https://unpkg.com/@webcomponents/custom-elements"></script>
or
import '@webcomponents/custom-elements'
that befor any dom manipulation code
if you want to invest some more time
you can write some code to check if custom elements are supported
and if not load the polyfill
but thats optional