Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 08:19
    18981119465 starred riot/riot
  • Jan 31 06:54
    brockklein starred riot/riot
  • Jan 31 03:39
    syuichi-tsuji starred riot/riot
  • Jan 30 21:00
    progelio closed #2657
  • Jan 30 20:40
    progelio opened #2657
  • Jan 30 12:21
    murillo94 starred riot/riot
  • Jan 30 07:33
    mhijack starred riot/riot
  • Jan 30 07:28
    QMonkey starred riot/riot
  • Jan 30 07:27
    GianlucaGuarini labeled #2655
  • Jan 30 07:22
    AbbyShaw36 starred riot/riot
  • Jan 30 07:04
    aniketsatarkar starred riot/riot
  • Jan 29 23:14
    asolfre starred riot/riot
  • Jan 29 17:34
    kazetsukaimiko closed #2656
  • Jan 29 17:34
    kazetsukaimiko commented #2656
  • Jan 29 17:32
    kazetsukaimiko opened #2656
  • Jan 29 12:49
    faghani starred riot/riot
  • Jan 29 07:34
    GianlucaGuarini assigned #2655
  • Jan 29 07:34
    GianlucaGuarini labeled #2655
  • Jan 29 06:36
    wang6821906 starred riot/riot
  • Jan 29 00:24
    Vic-Dev opened #2655
Brock Atkinson
@BrockAtkinson
wanna share your code with the chat?
bufferUnderrun
@bufferUnderrun
yes, i'm trying to make a simple reproductible example with the slowing down load
i'm already move some part and gain previous ms at load. so i think i have rendering issues.
i just saw one thing on whichi comparing perfs from v2 to v4 is not so easy : v2 update&mount&update (update twice) whereas v4 mount&update
i'm trying to patch v2 to have the same behaviour but still buggy at this time. Help appreciate of someone know the v2...
bufferUnderrun
@bufferUnderrun
I have 60 tags in my single page application. I have 2 strategies : for dev all src file are xhr and on prod only one file "bundle.tag" contains all of them (1,47Mo for 25000 lines).
riot.compile('controllers/bundle.tag', function() { riot.mount('appweb'); // a tag that just contains text });
it takes 4 or 5 sec ? so if compile is pretty fast, why mounting just a tag (on simple one) is very slow ?
when i just compile and mount nothing is extremly fast
jumping to v4 and doing the same crash the browser
the main app is here : https://3temps2.ville-troyes.fr (yes i'm french)
bufferUnderrun
@bufferUnderrun
another same app : https://passeport.troyes.fr/ this one is public so you can subscribe to work it
bufferUnderrun
@bufferUnderrun
ARGHHHHH !
BOTTLENEK FOUND in v2
came from the function cleanSource (src)
re.lastIndex = 0 while ((mm = re.exec(src))) { if (mm[0][0] === '<') { src = RegExp.leftContext + RegExp.rightContext re.lastIndex = mm[3] + 1 } }
re = HTML_COMMS
this parsing of all my bundle.tag file (1.47Mo, 25000 line) take more than 5sec
this regexp is for delete html com
it's a performance killer
i think there is the same function in v4 to clean and with the same perfs killer that's why my browser crash in v4
bufferUnderrun
@bufferUnderrun
when comment this code, the app still works without any error.
do you know if i can bring side effect or why this cleaning of comment is important ?
bufferUnderrun
@bufferUnderrun
i open an issue for sharing this
bufferUnderrun
@bufferUnderrun
i've patch the 2.6.9, and have a very good perfs in production.
bye guys, weekend :)
tu3816329
@tu3816329
Hi guys, i m relatively new with Riot 4. Anyone know how to call to an external tag with Riot4. With Riot3, there's this.tags
Example
<my-tag></mytag> <div class="wrapper"> <my-second-tag></my-second-tag> </div>
So how can i call <my-tag> to execute a function in export default { myfunction(){ this.update() } } from <my-second-tag> when i change a value in it
Any help would be appreciate
tu3816329
@tu3816329

What s more, how can i achieve something like this el.on(hello-event, function(greeting) {
self.hi = greeting
})

// trigger start event with one parameter
el.trigger('hello-event', 'Hello!')

tu3816329
@tu3816329
el.on('hello-event',function(){ }) in Riot 4
Georges Gomes
@georges-gomes
Dear riots, just a quick note, we added support for Riot in https://webcomponents.dev (Thanks @GianlucaGuarini for the help)
Would love to hear your feedback. Could be a very good tool for prototyping and reporting issues as it is - IMHO
Cheers!
rhysallister
@rhysallister
greetings all, anyone using parcel?
I'm getting the following error and im not sure why, given that the files in question exist.
rhys@victorious-wanyamaha:~/dev/grozmite/src$ parcel index.html 
Server running at http://localhost:1234 
⠙ Building app.js...Browserslist: caniuse-lite is outdated. Please run next command  npm update caniuse-lite browserslist
🚨  /home/rhys/dev/grozmite/src/app.js:3:19: Cannot resolve dependency './tags/add-num.riot' at '/home/rhys/dev/grozmite/src/tags/add-num.riot'
  1 | import * as riot from 'riot'
  2 | 
> 3 | import addnum from './tags/add-num.riot'
    |                   ^
  4 | import listnum from './tags/list-num.riot'
  5 | 
  6 | riot.register('add-num', addnum)
Browserslist: caniuse-lite is outdated. Please run next command  npm update caniuse-lite browserslist
lucabassplayer89
@lucabassplayer89
hi all, i am beginner with riot, i don't understand difference between <component>{variable}</component> and <component>{state.variable2}</component>. Someone can explain me? can i update one with this.update and other with this.update(variable2: "something")?
Jigs
@jigxee_twitter
Hello all. I am stuck with an issue integrating RiotJS in my Rails application. It would be a great help if anybody can spare some time for guiding in resolving the issues. I have posted my issues at https://stackoverflow.com/questions/58464371/unable-to-execute-riotjs-tags-in-rails-application. Thanks.
lucabassplayer89
@lucabassplayer89
what version of chromium supports riotjs v4?
Brock Atkinson
@BrockAtkinson
@rhysallister I use parcel, looks correct to me (as long as file ref is correct) - although I avoid hyphens in my filenames, perhaps try that?
Brock Atkinson
@BrockAtkinson
@lucabassplayer89 you are correct in that there are slight differences between accessing an exposed variable versus state (state is just an exposed object), it's more for developer organization + productivity
can't answer your second question unfortunately
Brock Atkinson
@BrockAtkinson
@jigxee_twitter unfortunately I can't help with your exact problem, but your layout looks much more complex than anything I've done - I always try to get code working from first principles: I use parcel.js and haven't had an issue, my core tag is always <app> (index.html ref: <div id='app'></div>) and have it up and running in 15 ~ 20 LOC
@tu3816329 I was able to achieve .on('ev', ev => {}) by actively declaring the a new EventEmitter() in my .js file and then triggering the event when required
Brock Atkinson
@BrockAtkinson
it's annoying that riot@4 removed events because they were handy, but they shouldn't be in the core
however, I ended up removing my event emitter and replacing it with a callback function
lucabassplayer89
@lucabassplayer89
Hi all, in riot v4 i don't understand how use observable event correctly. In my example i have 2 component tag, parent and child and one observable object.
Parent listen to "parent-event" to read a boolean variable. From this it knows if child has to b shown or not. Child tag listens another event to update a value.
the problem is: parent is ok, component child is shown (boolean is true) but child tag doesn't listen the event to update value. I have inserted the observable.on("child-event", ...) in "onBeforeMount" of child tag. Help me thanks
lucabassplayer89
@lucabassplayer89
@bufferUnderrun have you idea to use correctly observable in riot v4?